I’ve decided to finally solve the PDF preview problems. Until now I was using PDF.js, unfortunately due to poor performance of the WebView component its functioning was problematic (slow performance, application hangs out). In the newest version there will be a new mechanism for previewing PDFs - based on rendering individual PDF pages to images.

New PDF Preview

In the basic implementation the PDFBox library is responsible for rendering PDFs to images. It is not an ideal solution - it works well with “simple” PDFs. When converting more complex ones it uses a lot of memory, so I decided to introduce the first external optional dependency - XPDF. Due to the license, I can not distribute it with the application, but I provided a comfortable way to automatically download the necessary dependencies in the application settings.