Added thumbnail rendering for PDF-files
Adds thumbnail support for PDF files as proposed in #374. Uses Qt's inbuilt PDF renderer.
One thing which is kind of weird is the arbitrary scaling of the image with 2.5 but it turns this
into this
and makes the preview more readable (I think the 6.25x work increase is worth it).
I tried checking if the PDF is password protected. However, the docs don't have any info for the function passwordRequired() and it always returns true.
I tested it on these PDF example files. The majority work properly but some don't:
- Some ImageMagick Images
- PDFs with unreadable metadata
- PDFs which even Okular can't render
I'm moved this PR from the deprecated thumbnails branch to Alpha-v9.4, which is the branch that thumbnails was eventually merged into. However the v9.4.x releases are now feature frozen and are now solely reserved for bugfixes. This means that after the changes from thumbnails are ported to main that I'll once again be moving the target for this PR over to there as a v9.5 feature.
Sorry for the disruption, and thank you for your patience.
I've ported this functionality to main via #543, thank you for your contribution with this!