Hey guys,
Just thought I'd highlight this, I just updated from 7.x-2.0-beta1 to 7.x-2.0-beta2 and my PDF files are no longer reading the CSS file where I have all my customisations. It's not a huge deal as I can just roll back to beta1 but thought I'd identify it, at least.
Info:
Drupal 7.16 (current as at 2012-10-23)
DomPDF 0.3.0 beta3 (current as at 2012-10-23)
Print/Email/PDF 7.x-2.0-beta1 (pre-updrade: working)
Print/Email/PDF 7.x-2.0-beta1 (post-updrade: PDF style not working, print style working)
Process I used:
1. Updated Drupal core to latest
2. Updated other modules to latest versions (except print/email/pdf as I've had issues in past) using inbuilt updater
3. Took backup
4. Updated print beta1 to beta2 using inbuilt updater
5. copied my /sites/all/modules/print/css/print.css file up in place of default print.css file
6. Printer friendly version working fine / PDF version not reading css
7. Rolled back DB/files to backup taken in step 3, all working fine again (on beta1)
I also compared my settings pre- and post-update of the print module and all looked the same.
Happy to try any suggestions?
Thanks,
Chris
Comments
Comment #1
mrchrispaton commentedHi,
I am also seeing a similar issue there are no css styles being added to the pdf version but I could not get the beta1 to add any css styles either, I have just tried the 2.x-dev and same results.
What style sheet and class naming are you using to add your styles, are you using the print.css for Print and PDF?
Chris
Comment #2
Chasen commentedIn order to get around this issue, I've had to edit the print.css file from within the module. Currently using Beta1 as upgrading to Beta2 breaks things for my styling (even when backing up the modules print.css file).
Hope this helps
Comment #3
mrchrispaton commentedUpdate;
I have been doing some more testing with this module and have the 7.x-2.0-beta2 version working fine on my local machine using Acquia stack Drupal 7.14 but when I duplicate the site on my web server the styles and images are not displayed.
If I set the PDF settings to 'Access images via local file access' on the web server images are displayed but cannot get the PDF to display any style.
Comment #4
Anonymous (not verified) commentedComparable problems here. On the same server one site works perfectly with wkhtmltopdf and extra style sheet. Another site ignors the stylesheets.
As a workaround I copied the style sheet as an inline style sheet into print.tpl.php and after that all worked.
I can give you parameter values with Devel if you wish
Comment #5
jcnventuraThe module does try to convert the images to local in the cases where the server is not allowed to call itself. Note that this feature is not available when using wkhtmltopdf (due to a security advisory, wkthmltopdf is specifically forbidden from accessing local files - it's too good so Javascript attacks can be used to retrieve system data via the generated PDF.).
However there's nothing converting the CSS files to local paths.. And there has never been. So of course in these cases, the CSS doesn't work. IT NEVER DID.
That's why I don't understand about the OP.
Comment #6
jcnventuraNo further info in more than two weeks. Closing the issue.