Skip to content

Instantly share code, notes, and snippets.

@aspose-cloud
Created August 20, 2020 17:38
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/70c0a032b99f2c41a528f2fe88c9d134 to your computer and use it in GitHub Desktop.
Save aspose-cloud/70c0a032b99f2c41a528f2fe88c9d134 to your computer and use it in GitHub Desktop.
// For complete examples and data files, please go to https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-java/
String type = null;
String checksumValidation = ChecksumValidation.OFF.toString();
Boolean detectEncoding = null;
String preset = PresetType.HIGHPERFORMANCE.toString();
String url = "http://www.barcoding.com/images/Barcodes/pdf417.gif";
Integer rectX = null;
Integer rectY = null;
Integer rectWidth = null;
Integer rectHeight = null;
Boolean stripFNC = null;
Integer timeout = null;
Integer medianSmoothingWindowSize = null;
Boolean allowMedianSmoothing = null;
Boolean allowComplexBackground = null;
Boolean allowDatamatrixIndustrialBarcodes = null;
Boolean allowDecreasedImage = null;
Boolean allowDetectScanGap = null;
Boolean allowIncorrectBarcodes = null;
Boolean allowInvertImage = null;
Boolean allowMicroWhiteSpotsRemoving = null;
Boolean allowOneDFastBarcodesDetector = null;
Boolean allowOneDWipedBarsRestoration = null;
Boolean allowQRMicroQrRestoration = null;
Boolean allowRegularImage = null;
Boolean allowSaltAndPepperFiltering = null;
Boolean allowWhiteSpotsRemoving = null;
Double regionLikelihoodThresholdPercent = null;
List<Integer> scanWindowSizes = null;
Double similarity = null;
Boolean skipDiagonalSearch = null;
String australianPostEncodingTable = null;
String rectangleRegion = null;
File image = null;
BarcodeResponseList response =
api.postBarcodeRecognizeFromUrlOrContent(
type,checksumValidation,detectEncoding,preset,rectX,rectY,rectWidth,rectHeight,
stripFNC,timeout,medianSmoothingWindowSize,allowMedianSmoothing,allowComplexBackground,
allowDatamatrixIndustrialBarcodes,allowDecreasedImage,allowDetectScanGap,
allowIncorrectBarcodes,allowInvertImage,allowMicroWhiteSpotsRemoving,allowOneDFastBarcodesDetector,
allowOneDWipedBarsRestoration,allowQRMicroQrRestoration,allowRegularImage,allowSaltAndPepperFiltering,
allowWhiteSpotsRemoving,regionLikelihoodThresholdPercent,scanWindowSizes,similarity,skipDiagonalSearch,
australianPostEncodingTable,rectangleRegion,url,image);
assertNotNull(response);
assertFalse(response.getBarcodes().isEmpty());
BarcodeResponse barcode = response.getBarcodes().get(0);
assertEquals(DecodeBarcodeType.CODE11.getValue(), barcode.getType());
assertEquals("1234567812", barcode.getBarcodeValue());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment