Support for EncodeHintType.MARGIN for PDF417 was added to zxing in the newest release 3.0.0.
Zxing PDF417 edit padding / quiet zone
Pregunta
I am generating a PDF417 barcode with the zing library. All good with that...
writer = new PDF417Writer();
bitMatrix = writer.encode(barcodeMessage.getData(),
BarcodeFormat.PDF_417, WIDTH, WIDTH / 2, // To maintain a width/height ratio
ImmutableMap.of(
EncodeHintType.PDF417_COMPACT, Boolean.TRUE,
EncodeHintType.CHARACTER_SET, messageEncoding
)
);
barcodeBg = MatrixToImageWriter.toBufferedImage(bitMatrix);
But I was wondering if there is any way to be able to edit how much quiet zone is left at each side? Something similar to this... http://www.racoindustries.com/barcodegenerator/2d/pdf417.aspx that allows you to select how much space you have on each side.
I have tried adding this EncodeHintType.MARGIN but for this type of barcode it does not work.
Any ideas?
Solución
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow