Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
I setted up pdf files attachements to user profiles.
If i set the display setting for this field to "fileviewer" or "embed fileviewer" the bookreader is launched but the pdf file is not rendered.
Take a look here: http://www.drupality.be/users/jbfelix then click on "View" to display the page http://www.drupality.be/file/95
Thanks in advance for your help.
Comment | File | Size | Author |
---|---|---|---|
#4 | fileviewer.module.zip | 2.57 KB | baygon |
#1 | fileviewer.png | 11.21 KB | jbfelix |
#1 | embed.png | 11.68 KB | jbfelix |
Comments
Comment #1
jbfelix CreditAttribution: jbfelix commentedBtw there is a little mistake in the display settings: "fileviwer" and "embed fileviwer" in place of "fileviewer"
Comment #2
BenK CreditAttribution: BenK commentedSubscribing
Comment #3
shenzhuxi CreditAttribution: shenzhuxi commentedDo you install poppler-util http://poppler.freedesktop.org/ for converting pdf?
Comment #4
baygon CreditAttribution: baygon commentedIt's just a sugestion:
I found this module create rendered file in wrong directory and the render code part was comented. I just fix the code.
Folow fileviewer.module.fixed zipped, just unzip it, rename to fileviewer.module e try in your site. If doesn't work, try uncoment lines 112 and 113. Don't forget backup first your original fileviewer.module.
I still waiting an oficial update or patch from shenzhuxi, but it's just a trick to use till there. Im not sure is fully functional.
Good luck
Comment #5
shenzhuxi CreditAttribution: shenzhuxi commentedI test profile 2 and fileviewer HEAD, and they works well.
Please check out the latest codes.
@baygon
hook_file_update is used for file converting with file is uploaded. Do it in the display stage it's not necessary.
You may need to make your file directory permission right for poppler to write the png files in it.