Thanks for your reply! it made me realize that I can write a
CanvasProvider to draw a barcode and its as easy as draw rectangles and
text on a PDPageContentStream. :)
Ivan
On 10/5/2016 2:40 p. m., John Hewson wrote:
Currently, I'm using Barcode4J which generates an SVG, EPS, Image or Java2D.
I'm doing fine with the PNG option. I wanted to use SVG for quality but I was
not able to. So, my last option is Java2D.
You’re likely after only a handful of drawing commands, you could use Java2D’s
DebugGraphics to find out which ones and then it wouldn’t be hard to write an
absolutely minimal Graphics implementation which draws to a PDPageContentStream.
>Drawing Graphics on a PDF would have the same quality as a SVG? or using SVG
format is the only way to draw inside a PDF?
Drawing with a PDPageContentStream gives you vector graphics equivalent in
quality to SVG, EPS, Java2D, etc.
— John