Hi Laura,
Yes of course PDFBox can render PDFs.
However your question can be interpreted in two ways:
1) render a PDF without the images - you would have to change the source
code so it skips the images. Tricky.
2) render a PDF in a window without first rendering it into a
BufferedImage object, i.e. rendering directly into a graphics device -
yes, this is done e.g. by the PDFReader application. Look in the
sources, at the PDFPagePanel class, it uses PageDrawer.drawPage() to
draw a PDF page in a graphics object. The best would be that you copy &
paste from the PDFPagePanel and PDFReader classes. The PDFReader class
is what is used by the PDFReader command for the command line
application (https://pdfbox.apache.org/commandline/ )
https://svn.apache.org/viewvc/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdfviewer/PDFPagePanel.java?view=markup
Tilman
Am 15.11.2014 um 02:24 schrieb Laura DE STAERKE:
Good morning, Good afternoon, Good evening and Good night,
First of all, I would like to apologize in advance if what I write is not
very clear for you, English is not my native language but I'll do my best
:-) .
I have done some researches on the web these last days to understand if
PDFBox can be used or not to render PDF.
I currently use it to display my PDF into a JScrollPane in converting the
page I want to display into an image. I have added as well a toolbar to
enable the user to interact on the PDF (zoom, go to the next page,
rotation, print etc...)
I would like to be able to display the pdf without having to create some
images. When I look at the PDFBox features described on the PDFBox website,
PDF rendering is not one of them.
However in digging a bit into the web I have found some people that say
that they success in displaying PDF with PDFBox without creating images,
others, found in the forums, say that it doesn't work well so they gave up
and do that by creating images now (like* I *currently* do)*.
The reasons I want to stop displaying the PDF with images are that I have
notice that the performance are not very good when the document is complex
and I would like to be able to display a continuous view of the document
that would enable teh user to go over all the document with the mouse wheel.
I thank you a lot for your time and thank you in advance for your help.
Have a good weekend
Regards