Support

Home Forums Event Espresso Premium Styles not loading in PDFs

Styles not loading in PDFs

Posted: April 17, 2015 at 5:21 am

Viewing 6 reply threads


Clare Cable

April 17, 2015 at 5:21 am

My client reported that recently the PDF templates appear broken. The PDFs are getting generated, but there don’t appear to be any styles loaded for them.

We are using custom templates, but I disabled them to test the default templates and we still have the same problem.

I’ve checked that the CSS files are still there and didn’t get accidentally deleted. I’ve also checked and there have been no updates to any plugins or themes performed.

We’re still on EE4.4.6.p and unable to update because of some backwards-incompatible changes you introduced to the single page checkout in newer versions.

Do you have any idea where I should look to troubleshoot the problems with the stylesheets? Where in Events Espresso can I dig in to see if the stylesheets are getting loaded properly before the PDF is generated?


Tony

  • Support Staff

April 17, 2015 at 5:41 am

Hi Clare,

We’re still on EE4.4.6.p and unable to update because of some backwards-incompatible changes you introduced to the single page checkout in newer versions.

Can you provide further detail on this please?

Do you have any idea where I should look to troubleshoot the problems with the stylesheets? Where in Events Espresso can I dig in to see if the stylesheets are getting loaded properly before the PDF is generated?

Is the logo image loading correctly within the PDF?

Has fopen() been disabled on your server? Specifically allow_url_fopen.


Clare Cable

April 17, 2015 at 6:19 am

Hi Tony,

We needed to add some conditional logic and special routing to the single page checkout process. I was told the SPC was completely rewritten for 4.5 or 4.6 and my client does not have the budget to pay me to do it all over again.

The logo image is not loading correctly in the PDF. I’ll check into fopen() on the server, thanks. Unfortunately I’m a third-party contractor without direct access to everything.


Tony

  • Support Staff

April 17, 2015 at 6:31 am

To provide some background.

The DOMPDF library that EE uses to generate the PDFs uses fopen() to pull in the styles and images for the PDF’s, if it is disabled then neither of those will load.

You can usually check this by enabling WP_DEBUG and downloading a PDF, you should see errors concerning fopen.


Clare Cable

April 17, 2015 at 8:03 am

Hi Tony,

I found the following errors in the log, though I’m not sure they’re related.

[Fri Apr 17 03:28:43.766330 2015] [autoindex:error] [pid 754345] [client 91.194.84.106:40099] AH01276: Cannot serve directory /home/newtreed/public_html/qnis.org.uk/wp-content/uploads/2011/04/: No matching DirectoryIndex (index.html.var,index.htm,index.html,index.shtml,index.xhtml,index.wml,index.perl,index.pl,index.plx,index.ppl,index.cgi,index.jsp,index.js,index.jp,index.php4,index.php3,index.php,index.phtml,default.htm,default.html,home.htm,index.php5,Default.html,Default.htm,home.html) found, and server-generated directory index forbidden by Options directive
[Fri Apr 17 03:28:25.789125 2015] [autoindex:error] [pid 752099] [client 91.194.84.106:61625] AH01276: Cannot serve directory /home/newtreed/public_html/qnis.org.uk/wp-content/uploads/2011/04/: No matching DirectoryIndex (index.html.var,index.htm,index.html,index.shtml,index.xhtml,index.wml,index.perl,index.pl,index.plx,index.ppl,index.cgi,index.jsp,index.js,index.jp,index.php4,index.php3,index.php,index.phtml,default.htm,default.html,home.htm,index.php5,Default.html,Default.htm,home.html) found, and server-generated directory index forbidden by Options directive

The logo image, set in both General Settings and under the Invoice settings, is /uploads/2014/12/logo-bw-sml.png.

It looks like allow_url_fopen is ON but allow_url_include is OFF. Could that be the issue?


Clare Cable

April 17, 2015 at 8:08 am

Scratch that! Looks like allow_url_fopen was only enabled on the main directory and wasn’t recursing to all directories. Now that they’ve set that in the .htaccess file it’s working. Thanks!


Tony

  • Support Staff

April 17, 2015 at 8:23 am

Great 🙂

I’m glad its now working.

If you have any further problems just let us know.

Viewing 6 reply threads

The support post ‘Styles not loading in PDFs’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso