Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@aspose-cloud
Last active December 2, 2021 07:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aspose-cloud/61a7a9868cdc710bf7fd096eb5eef80c to your computer and use it in GitHub Desktop.
Save aspose-cloud/61a7a9868cdc710bf7fd096eb5eef80c to your computer and use it in GitHub Desktop.
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