Hello,
I just installed the module on the production version. The images are not displayed in PDF files. I use the dompdf library.
Here is the result of a PDF file generated by the module:
http://www.carmelo-crea.net/printpdf/34
Thank you in advance for your help!
Comments
Comment #1
jcnventura"Access denied"
Comment #2
Clément commentedOops, sorry. That now you have permissions. (the 2 images that work are links pointing to YouTube for a test (not hosted on the server))
Comment #3
jcnventuraOK, This is what I see:
The first image is
http://1.1.1.4/bmi/www.carmelo-crea.net/sites/default/files/styles/galle...
Assuming that your $base_url (a global Drupal variable) is http://www.carmelo-crea.net, there's no way that the module is doing it's try-to-convert-to-local-filename algorithm. As such, it seems that your webserver is able to open the last two files, but not the initial ones.
If on the other hand, that URL is the result of some performance booster, can you provide the following:
1. The img src as Drupal sees it.
2. The real path of the file
Comment #4
Clément commentedThe base URL is present in the url of my pictures on the page (http://www.carmelo-crea.net/showroom).
Here is an excerpt from the HTML generated by Drupal in the node:
Directory files and these children are in CHMOD 777
Thank you for your help.
Comment #5
jcnventuraIt is possible that the module is doing it's replacement to access the file locally.
It's accessing at /sites/default/files/styles/gallerie-node/public/images/showroom/00.jpg
Where is the location of the drupal index.php file.
If the files are there usually dompdf is able to access them.
Comment #6
Clément commentedI think I found the problem.
Here's what the error log shows:
Apparently the root path is not defined in the module line 82.
Comment #7
jcnventuraThanks for your help!
Indeed, I noticed and fixed that problem 4 days ago. If you get the latest version, you'll probably get the images correctly (fingers crossed! :) )
Comment #8
Clément commentedThank you for what you do.
I'm really sorry but despite updating the links does not work. I have no notice of the module.
Comment #9
jcnventuraif it wasn't the above, then I really need more info..
From #5:
It is possible that the module is doing it's replacement to access the file locally.
It's accessing at __somewhere__/sites/default/files/styles/gallerie-node/public/images/showroom/00.jpg
Where __somewhere__ is the location of the drupal index.php file.
Are the files there?
Comment #10
Clément commentedI'm not sure I understand the question.
Index.php Drupal is at the root of the site.
Here are the installation site:
index.php
sites/default/
sites/default/settings.php
sites/default/files/
sites/default/themes/
sites/default/tmp/ <- Cache pdf
sites/all/modules/
sites/all/modules/print
sites/all/modules/print/lib/dompdf
All images from external domains to work, by against images hosted on the site domain does not.
example:
http://www.other-domain/image.jpg -> work
http://www.site-domain/image.jpg -> does not work
Comment #11
jcnventuraThe question is simple. Is there a file called 00.jpg in sites/default/files/styles/gallerie-node/public/images/showroom ?
Comment #12
Clément commentedYes, I confirm (FTP: /httpdocs/sites/default/files/styles/gallerie-node/public/images/biens-immobilier/00.jpg)
I just realized that this host does apparently only to CHMOD 664 on files.
It could be the problem...
Comment #13
jcnventuraYou haven't really confirmed it... showroom is not really the equal to biens-immobilier
dompdf running as your web server is looking for the file in __path__/showroom/00.jpg where __path__ seems to be /httpdocs/sites/default/files/styles/gallerie-node/public/images/
You're telling me it's in __path__/biens-immobilier/00.jpg.
Comment #14
Clément commentedSorry for the error of inatention...
The file on the server from the FTP is:
/httpdocs/sites/default/files/styles/gallerie-node/public/images/showroom/00.jpg
The image is well represented at this URL (url not rewritten):
http://carmelo-crea.net/sites/default/files/styles/gallerie-node/public/...
Comment #15
jcnventuraI have no idea why it didn't find the file.. I guess there's some reason for it, but it totally escapes me.. However, you might want to try the latest version.. By default, this version now tries to access the file via URL open.
Comment #16
jcnventuraNo further info in two weeks. Closing the issue.
Comment #17
nguyentran commentedThank you, change the permission on folder is working for me.