Posted by iastream on August 6, 2012 at 12:29pm
We have a Drupal 7 site where certain documents need to be generated as PDF.
we are using dompdf library and print to PDF (http://drupal.org/project/print) module.
Everything seems to be working ok with the latest version of dompdf except that images do not print for non-administrator users. For the same document, when generating as a non-admin, we get the following error in PDF file "Image not found file:///home/cincias2/public_html/aurums/sites/default/files/PMET%20NewLogo.jpg"
Any thoughts or ideas will be greatly appreciate. I will gladly cover your time so we can wrap this up quickly.
Alex
Comments
The first thing I would do is
The first thing I would do is to get domPDF to change your src attribute to point to the image via http, e.g. http://localhost/sites/default/files/PMET%20NewLogo.jpg.
Then you can inspect your web server logs to see what they are telling you.
Be sure to check your Drupal recent log entries as well.
Something easy to overlook that should be checked
It's easy to overlook this. Have you checked the permissions settings for that module on the permissions page. Anytime something comes up in Drupal that can be mapped to the sentence, (X works with the administrative user but not any of the others), or, (X works with certain roles, but not others), then the first thing to check would be the permissions.
Any luck finding a solution?
I'm coming across the same thing. My pdf says Image not found, but gives a link to the image which is correct, and points to an image. No styles are being picked up by the pdf.
However, all settings work correctly on my local. Wondering if there are certain server requirements that need to be set up...???
Same problem
HI KATHY!!
I am having the same problem but with mpdf.
I figured it out
the problem was that print module used file_get_contents to get images and . I overwrote all file_get_contents with curl-based image downloads and now everything works fine.
Hi Can you please be a bit
Hi Can you please be a bit more explanantory for a non technical person to follow this? I am going through the same problem and am unable to come up with an answer. Thanks in advance!
Jaya
any news on this topic? i ran
any news on this topic? i ran into the same problem. pdf is generating nicely on my local setup, but prints out 'image not found' and the imagelink on the stage server. the imagelink actually points to the correct image on the server.
Problem solved
I am using Drupal 7 with Printer, Email and PDF Settings module and domPDF library to generate PDF and had same problem, everytime PDF is generated, image does not display but a correct link to the image is displayed.
This is the solution that works for me:
1. Go to Configuration > Printer, email and PDF versions
2. Ensure that "Access images via local file access" is checked
3. Save configuration
4. Regenerate the PDF
5. Image should be displayed now.
This worked for me :)
This worked for me :)
Dompdf not generating pdf.
I am using dompdf for generating pdf in Drupal 7. its working very fine on localhost. But its not working on online server. There it is not generating page also. It just reload the page again. Anybody please help me.
server software
Did you install and configure dompdf on your server? If so, do you see it in Drupal's status report on production?
yes!.... that was the first
yes!....
that was the first things i checked for this. I don't know why its not working on live server. However it is working fine on localhost. Please help me.
Thanks for you support.
I am also having this issue
Hi, I too am having this issue running Drupal 8.6.4 with DomPDF. Did anyone find out what the issue was?