Support

Home Forums Event Espresso Premium Why is the PDF version of invoice laying out so badly?

Why is the PDF version of invoice laying out so badly?

Posted: January 10, 2018 at 10:59 am

Viewing 3 reply threads


drkings1

January 10, 2018 at 10:59 am

With your help I’ve managed to set up my invoices on EE so they are laying out OK with a logo present and correct. This is what a user would be shown on screen:

https://screencast.com/t/hnDf1GwB9t

And this looks very neat and tidy.

But when a user downloads an invoice as a PDF, this is what they get:

https://screencast.com/t/cbrQMMXHdgWK

Which looks extremely ungainly and messy by comparison.

Is there any reason for this difference and is there a way to make the printable invoices more like those that appear on screen?

Many thanks

Daniel


Tony

  • Support Staff

January 10, 2018 at 12:02 pm

Hi Daniel,

The printable PDF should already look like the screen version, here is the PDF version of one of my Invoices – http://take.ms/AqvXG

The problem is the same issue you have in your other thread:

https://eventespresso.com/topic/missing-icon-on-downloaded-invoice/

Something on the server is blocking the requests for external files, the CSS isn’t loading when DOMPDF is converting the files so your getting stripped down versions.

When you used an external image for your logo you worked around that specific image, but not the cause of the problem so you need to contact your host and have them to investigate. For example, DOMPDF requires allow_url_fopen is not disabled on the server to allow it to pull in the ‘external’ files (which are actually hosted locally but its using the full url so doesn’t know the difference).


drkings1

January 12, 2018 at 10:43 am

Hi Tony,

Thank you for your helpful reply.

I have contacted my hosting company.

They were able to resolve the issue by making changes to my HTAccess file (see below).

This is what the technical support team had to say:

After further investigations, I found that the problem is caused by some of the directives in your .htaccess file and most probably the gZip compression.

I have renamed the file to .htaccess_BKP and I have create new .htaccess file with the following content:

Code:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

After this change the downloaded invoice is displayed correctly:

https://prnt.sc/hzkdhn

Many thanks for your help

Daniel


Tony

  • Support Staff

January 12, 2018 at 2:44 pm

Great, thank you for the update and I’m glad it’s working.

You could also try your original logo rather than the external one if preferred, but that’s up to you 🙂

Viewing 3 reply threads

The support post ‘Why is the PDF version of invoice laying out so badly?’ 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