Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This Gist repository contains code snippets related to Aspose.BarCode Cloud Java SDK.
Aspose.BarCode-Cloud-Java-SDK
ApiClient client = new ApiClient(
"App SID from https://dashboard.aspose.cloud/#/apps",
"App Key from https://dashboard.aspose.cloud/#/apps");
com.aspose.barcode.cloud.api.BarcodeApi api = new com.aspose.barcode.cloud.api.BarcodeApi(client);
String name = "MySample.jpeg";
String type = com.aspose.barcode.cloud.model.EncodeBarcodeType.CODE39STANDARD.getValue();
String text = "Barcode processing API"; // String | Text to encode.
String twoDDisplayText = null;
String textLocation = com.aspose.barcode.cloud.model.CodeLocation.ABOVE.getValue();
String textAlignment = com.aspose.barcode.cloud.model.TextAlignment.CENTER.getValue();
String textColor = "Navy";
String fontSizeMode = com.aspose.barcode.cloud.model.FontMode.AUTO.getValue();
int resolution = 200;
double resolutionX = 200;
double resolutionY = 200;
String barColor = "Orange";
String format = "JPEG";
try {
com.aspose.barcode.cloud.model.ResultImageInfo result = api.putBarcodeGenerateFile(
name,
type,
text,
twoDDisplayText,
textLocation,
textAlignment,
textColor,
fontSizeMode,
(double) resolution,
resolutionX,
resolutionY,
null,
null,
null,
null,
null,
null,
null,
null,
"Silver",
barColor,
"Blue",
null,
null,
true,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
format);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling BarcodeApi#PutBarcodeGenerateFile");
e.printStackTrace();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.