Last active
December 2, 2021 07:26
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Aspose.BarCode-Cloud-Java-SDK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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