• Post Reply Bookmark Topic Watch Topic
  • New Topic

Convert PDF to awt.Graphics

 
James Gordon
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I intend to do PDF file printing with AWT.
The idea is to convert the PDF to java Graphics object and then execute the
printAll(Graphics g) method.

I can't seem to find a library to do the PDF->Graphics conversion.
Any clues?

Please advise.

Thanks in advance.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Extracting formatting information (or actually anything but text) from a PDF is a tough proposition. I'm not aware of any library that can do this. Would using the Adobe AcrobatViewer for Java Bean be an option? It can print PDFs.
 
James Gordon
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I tried out the viewer with some PDFs.
It's either the PDF was not shown with some errors reported
or the PDF came out but doesn't look similar to the original.


Thanks.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!