On Mon, Jan 9, 2017 at 4:46 PM, Shivangi Singal <
[email protected]> wrote:

> Hi Andreas ,
>
> Yes I did give barcode4j a try but it gives barcode as an image which is
> then placed onto pdf and then when printed might lose the graphics after so
> much re-rendering.
>

barcode4j does not just create images, you can also create SVG output. SVG
is an XML based vector format. You could parse this SVG and convert the
drawing commands to PDF drawing commands and add those to your document.
This would then create a vector based barcode. The only obstacle is the
parsing and conversion of SVG. I would analyze barcode4j output to see how
complex it would be to write my own parser/converter, and if that's not an
option, you can go with Apache Batik (https://xmlgraphics.apache.org/batik/)
to do the heavy lifting.

Reply via email to