Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active September 19, 2022 16:45
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-com-gists/ef02e05c4c7693c0949f0be77047cb29 to your computer and use it in GitHub Desktop.
Save aspose-com-gists/ef02e05c4c7693c0949f0be77047cb29 to your computer and use it in GitHub Desktop.
Generate Pdf417 Barcode in Java
// Initialize an object of BarcodeGenerator class
BarcodeGenerator gen = new BarcodeGenerator(EncodeTypes.PDF_417, "Åspóse");
// Set the pixels
gen.getParameters().getBarcode().getXDimension().setPixels(2);
// Set number of columns and rows
gen.getParameters().getBarcode().getPdf417().setColumns(4);
gen.getParameters().getBarcode().getPdf417().setRows(9);
// Save output Pdf417 Barcode
gen.save("Pdf417RowColumns.png", BarCodeImageFormat.PNG);
// Initialize an object of BarcodeGenerator class
BarcodeGenerator gen = new BarcodeGenerator(EncodeTypes.PDF_417, "Åspóse");
// Set the pixels
gen.getParameters().getBarcode().getXDimension().setPixels(2);
// Save output Pdf417 Barcode
gen.save("Pdf417.png", BarCodeImageFormat.PNG);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment