I'm using the org.apache.pdfbox.pdfviewer.PageDrawer class to draw an
image of a PDF and it doesn't look quite the same.  Surely the method I
came up with to draw lines on the pages of the PDF is not the best but
they look fine in the PDF and don't come up on the drawing.  I think
it's a layering issue, that the PDF has multiple objects positioned on
top each other and they're getting hidden in the graphic drawing.
 

-----Original Message-----
From: [email protected] [mailto:[email protected]] 
Sent: Thursday, April 21, 2011 3:55 PM
To: [email protected]
Subject: Converting an image to a PDF

I'm looking for a way to convert an image to a PDF.  I found
org.apache.pdfbox.examples.pdmodel.ImageToPDF which looks like it'll
work for JPG and TIF files, but it doesn't seem to support PNG (or any
other type for that matter).  I traced through the library a little and
found some code that was commented out which uses a PDPixelMap, but the
constructor which takes a BufferedImage no longer exists.  The comments
around there say "This method is broken and needs to be implemented"
which is a bit discouraging.

So my basic question is this: Is there an easy way to convert a PNG to a
PDF?

If so, do I need to worry about things like scaling, images becoming
blurry or too small to see/read, large images getting cut off b/c they
don't fit on a page, etc.?

----
Thanks,
Adam

- FHA 203b; 203k; HECM; VA; USDA; Conventional
- Warehouse Lines; FHA-Authorized Originators
- Lending and Servicing in over 45 States 
www.swmc.com   -  www.simplehecmcalculator.com   Visit
www.swmc.com/resources   for helpful links on Training, Webinars, Lender
Alerts and Submitting Conditions  
This email and any content within or attached hereto from Sun West
Mortgage Company, Inc. is confidential and/or legally privileged. The
information is intended only for the use of the individual or entity
named on this email. If you are not the intended recipient, you are
hereby notified that any disclosure, copying, distribution or taking any
action in reliance on the contents of this email information is strictly
prohibited, and that the documents should be returned to this office
immediately by email. Receipt by anyone other than the intended
recipient is not a waiver of any privilege. Please do not include your
social security number, account number, or any other personal or
financial information in the content of the email. Should you have any
questions, please call (800) 453 7884.  

Reply via email to