function upload_file_pdf is not triggered #651

Closed
opened 2026-10-05 00:09:15 +02:00 by adam · 6 comments
Owner

Hey!

My Piwigo 2.9.0 is working very well. – But one thing:
When uploading a PDF (nothing special, one page with pure text) the thumbnail is not created. (I always see the thumbnail themes/default/icon/mimetypes/unknown.png.)

Actually I need the thumbnail creation for PDF with the upload functionality and with (folder) syncing. – Is that a known problem and can you help me, please!? (I looked a lot around: documentation, forums, bug tracker and on github with no luck …)

Thanks and best regards!

Hey! My Piwigo 2.9.0 is working very well. – But one thing: When uploading a PDF (nothing special, one page with pure text) the thumbnail is not created. (I always see the thumbnail `themes/default/icon/mimetypes/unknown.png`.) Actually I need the thumbnail creation for PDF with the upload functionality and with (folder) syncing. – Is that a known problem and can you help me, please!? (I looked a lot around: documentation, forums, bug tracker and on github with no luck …) Thanks and best regards! <!-- github-sync-id:235336677 -->
adam closed this issue 2026-10-05 00:09:15 +02:00
Author
Owner

Hi!
Today I upgraded to 2.9.1 and have to say that this issue isn't fixed. :-|
→ Is no one using Piwigo with/for PDFs?

Hi! Today I upgraded to 2.9.1 and have to say that this issue isn't fixed. :-| → Is no one using Piwigo with/for PDFs? <!-- github-comment-id:310614248 -->
Author
Owner

Hi again!
After the upgrade to 2.9.2, it's the same … :-|
Please can you fix the PDF views!? #thx

Hi again! After the upgrade to 2.9.2, it's the same … :-| Please can you fix the PDF views!? #thx <!-- github-comment-id:338265819 -->
Author
Owner

It looks like the code is gated for external ImageMagick so, depending on your setup, you may need to set $conf['graphics_library'] = 'ext_imagick';. Make sure the convert binary is in your path, or you can specify where it is. Run it manually with a PDF if it still doesn't work to see if there are any errors being silently ignored.

It looks like [the code is gated](https://github.com/Piwigo/Piwigo/blob/master/admin/include/functions_upload.inc.php#L416) for external ImageMagick so, depending on your setup, you may need to set `$conf['graphics_library'] = 'ext_imagick';`. Make sure the `convert` binary is in your path, or you can specify where it is. Run it manually with a PDF if it still doesn't work to see if there are any errors being silently ignored. <!-- github-comment-id:512905418 -->
Author
Owner

I have the same matter with 2.10.RC and the log file is not really descriptive enough to see when/where something go wrong.

I have the same matter with 2.10.RC and the log file is not really descriptive enough to see when/where something go wrong. <!-- github-comment-id:527946684 -->
Author
Owner

After trying to convert pdf in jpg in command line using imagemagick convert tool (I have this matter on local installation), I've got an error too.

Investigating, reveal a security update in imagemagick policy.xml (in /etc/imagemagick** directory) disabling the PDF treatment.

Modifying the part "right:none" in the PDF line by "right:read|write" seems to fix the matter of no thumbnailing PDF.

After trying to convert pdf in jpg in command line using imagemagick convert tool (I have this matter on local installation), I've got an error too. Investigating, reveal a security update in imagemagick policy.xml (in /etc/imagemagick** directory) disabling the PDF treatment. Modifying the part "right:none" in the PDF line by "right:read|write" seems to fix the matter of no thumbnailing PDF. <!-- github-comment-id:528750952 -->
Author
Owner

Thanks @jpsingleton!

Your solution may work but I can't test it, becaus I use (for security) GraphicsMagick, which currently isn't implemented …

BR

Thanks @jpsingleton! Your solution may work but I can't test it, becaus I use (for security) GraphicsMagick, which currently isn't implemented … BR <!-- github-comment-id:778031929 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#651