Hello,
I have a problem displaying a PDF with pdf box.
Many characters in the attached PDF are displayed wrong as you can see
in the result.png.
Especially numbers and spaces are not displayed correctly. Sometimes I
can see
the numbers, sometimes not. I could not find out the reason yet.
Perhaps someone already had this problem and can help me with that?!
To display the PDF I use the following code:
PDDocument document = parseDocument(file);
List pages = document.getDocumentCatalog().getAllPages();
PDPage page = (PDPage)pages.get(0);
Image pageImage = page.convertToImage();
ImageIcon imageicon = new ImageIcon(pageImage);
documentPanel.add(new JLabel(imageicon));
The problem occurs when I convert the PDF to an image but also when I show
it in a PDPagePanel.
Thank you very much
Marco Siefert