Hi,

I run Print 7.x-2.0 with Dompdf on a Drupal 7.41/CentOS 6.7 VM.

Everything was running smoothly until I restart the CentOS VM this morning.

Since I have lost all images in the PDF (error message : image not found and a link http://rallystory-bo/sites/default/files/styles/logo_200x200/public/imag... that actually works).

I would like to check the "Access local ..." settings but the /admin/config/user-interface/print/pdf admin link is corrupted.

Once again, everything was running smoothly 1 day before !

Really drives me nuts...

Comments

misterpo created an issue. See original summary.

misterpo’s picture

Actually, the situation is pretty unstable. Sometimes working, sometimes not.

Is there a recommended domdf library version ?

Thx in advance.

misterpo’s picture

Hi,

I got the PDF options tab back after upgrading another module.

Checking the "Access local images" fixed the images issue but CSS styles are still not applied...

The HTML print version is perfectly rendered but the PDF file does not apply CSS.

CSS are injected through the CSS Injector module and the "Keep the current theme CSS" setting is checked.

Please help, I have a demon scheduled with my customer on next tuesday !

odegard’s picture

Check your permissions. Perhaps dompdf runs as a user that has no read access to css files? You could check this easily by chmod 777 one css file and see if it is picked up by dompdf, then you'd know it's a ownership issue.

misterpo’s picture

Thanks for your reply odegard.

This is really driving me nuts.

CSS Injector files are in sites/default/files/css_injector dir which has 775 access and is owned by my user:apache. I have tried to chmod 777 without success.

Dompdf is in the sites/all/libraries which has 755 access and is owned by my_user:apache.

I guess apache runs dompdf so it does not look to be an access right issue...

misterpo’s picture

Hi,

I'm still stick with this issue.

There are many topics about this CSS issue but no solution are brought...

Is there any documentation on how this module should be setup ?

misterpo’s picture

I have spend hours and red dozens of posts regarding this dompdf issue without success...

So I have switched to wkhtmltopdf which almost works out-of-the-box with my CSS rules.

I had to change the Wkhtmltopdf options to : --enable-local-file-access --allow full_path_to_web_dir to make it render CSS and images properly.

But I still unfortunately have an issue : I have developed a custom module to send these PDF by e-mail using the print_pdf_generate_path function and some of the files are properly rendered when sent by e-mail and some are not.

Please not I have the same problem with Mpdf, which has very poor CSS support.

misterpo’s picture

Email problem is fixed (CSS were restricted to certain pages).

misterpo’s picture

Status: Active » Closed (fixed)