2

I'm developing an application for printing PDF documents using Java and the library PDFRenderer, but I'm facing a problem while trying to use this library to view a PDF file.

I know that PDFRenderer allows me to view a PDF within a Java application, but I don't know how to do it, does somebody know how?

TylerH
  • 20,799
  • 66
  • 75
  • 101
wlegend
  • 21
  • 1
  • 3

4 Answers4

1

PDFRenderer is fun but has problems with more complex PDF files (transparencies, some font tricks).

We have good results with qoppa Pdf Images, which is a good and solid pdf to image renderer. They also have viewer component for Swing, i think. It is a commercial library, but it is well priced, because it just works.

You can find it here http://www.qoppa.com

squiddle
  • 1,259
  • 8
  • 17
  • @Zach, thanks a lot for your responces , but realy a i prefer the open source solution it's for 0$ and it can do what i need , i guess , i'll try the code posted in PDFRenderer demos and i'll see what's gonna happen.thnx guys – wlegend Apr 29 '11 at 23:20
  • There are open source alternatives with icepdf, jpedal and multivalent. – mark stephens Apr 30 '11 at 09:31
  • icepdf is good for the basics. We used it before qoppa. It works good until some point. For embedded fonts and some other complex features you need the commercial version, too. Font rendering is most likely always a problem because it is a patent-minefield :( – squiddle May 05 '11 at 10:00
0

In the PDFRenderer_src pack that can be downloaded from the PDF Renderer site there's a demo included which gives a sample of pdf viewing piece of code, see: \demos\viewer\com\sun\pdfview.

deoem
  • 1
  • 1
0

PDFRenderer is a really fun library to use. Very useful and pretty fast/complete for being a free library.

Anyway, the source code is available at PDFRenderer subversion site

Zach
  • 897
  • 1
  • 9
  • 15
-1

don't know the library. but assuming you get your pdf as some sort of object, you might want to check if there's a method to convert it into, say, a jpeg. displaying a jpeg is then just a question of your UI toolkit.

Nicolas78
  • 5,124
  • 1
  • 23
  • 41
  • thnx Nicolas for your answer , actualy i've found something like that to convert the pdf pages into images but it doesn't look fine , it looks small with lower quality. – wlegend Apr 29 '11 at 19:16