pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Hewson <j...@jahewson.com>
Subject Re: Draw Graphics in a PDF
Date Tue, 10 May 2016 19:19:47 GMT

> On 10 May 2016, at 11:35, Ivan Ridao Freitas <info@ivanrf.com> wrote:
> 
> 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. :)

We often get people asking about Barcode4J, so feel free to share the resulting code, if possible.
There will be interest.

— John

> 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
>> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Mime
View raw message