Java PDFViewCtrl is not working properly


Im experiencing troubles with the newest versions of your PDFNet libraries. My problem is connected with the usage of PDFViewCtrl class for displaying PDF file – when using PDFNet version 5.9, everything is ok, but when using newer versions (Ive tried 6.2123937 and 6.232582 from March and July).

The PDF is not displayed at all, and instead of file grey field is shown.

I am experiencing this problem as a part of big internal application, but for demonstration purposes I`ve written small app (it is located in attached zip file under name using only one window for displaying PDF.


I`ve tried to run PDFViewTest and everything worked fine, so I was looking for differences between your and my solution and finally I came to this – I was using probably older way to render PDF with scrollbar like this:

JScrollPane pdfviewPane = new JScrollPane(view, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);


Instead of your way:

PDFViewScrollPane = view.getViewPane();


First way was working with old library, but not with the new one. So I`ve replaced my code with your sample code and then everything is working fine until then. So thank you for your help!


I am started to try to display a PDF with Java and swing
Is it possible to get ?