TagStudio icon indicating copy to clipboard operation
TagStudio copied to clipboard

Added thumbnail rendering for PDF-files

Open Heiholf opened this issue 1 year ago • 1 comments

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 Factor_1 into this Factor_2p5 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

Heiholf avatar Aug 23 '24 12:08 Heiholf

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.

CyanVoxel avatar Sep 15 '24 07:09 CyanVoxel

I've ported this functionality to main via #543, thank you for your contribution with this!

CyanVoxel avatar Oct 14 '24 23:10 CyanVoxel