Try Apache FOP: http://xmlgraphics.apache.org/fop/.
It has very good support for many different image types. Just download
it and try it from the command-line:
fop -imagein myimage.png -pdf myimage.pdf
On 22.04.2011 02:01:50 Adam wrote:
> I see. I also found out that converting to a TIF was not
I see. I also found out that converting to a TIF was not a trivial task,
so I went with the PNG -> JPG -> [Resized JPG to fit on page ->] PDF
route. Not the best solution, but it's good enough to suit my needs.
If anyone wants to work on the PDPixelMap(PDDocument doc, BufferedImage
awtImage)
Yes, I can confirm that works, but may not produce acceptable results
depending on the image. JPG is not optimal for many types of images. I
have the same issue with pdfbox...
Russ
On Apr 21, 2011 4:38 PM, "Ken Bowen" wrote:
> Adam,
>
> Why not do a separate conversion of the PNG to JPEG first,
Adam,
Why not do a separate conversion of the PNG to JPEG first, and then convert the
JPEG to PDF? There are many tools (if it's only a one-off or two) and
libraries (for a pipeline) out there. I even think you could probably do the
conversion using the basic JVM 1.6 AWT facilities.
Ken
On
Using:
- PDFBox 1.5
- Java 1.6.0_20
- Linux RHEL 5 and Windows XP
I am not intimately familiar with the PDF spec and am unsure if my current
problem lies with PDFBox or Acrobat 9 Pro.
I have two PDFs, PDF1 and PDF2. PDFBox can successfully parse both PDFs.
- PDF1 is created directly with Acroba
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 w
6 matches
Mail list logo