PDF not generated correctly

I seem to be experiencing troubles with the generated PDF’s which are attached to emails

I did a fresh installation of invoiceplane but my generated PDF’s look like this:


compared to other invoiceplane sites (running an older version) where they would look just fine

image other installation on older version 1.5.3 looks just fine

Nobody who has an idea?

It depends from the old version you got but maybe you have to rewrite your PDF template to use last new styles.
It happens to me when upgrading from old version to newer I had to rewrite it :confused:

I did a fresh installation…

I mean using an old version of the template in the new version which can cause this problem

I didnt use an old template,

the screenshots im showing you is another installation running an earier version.

i really really dont get it, the web version of the invoic looks ok, just this one looks really odd.

i really really dont get it, the web version of the invoic looks ok, just this one looks really odd.

…This is because the web version uses a different template.

Looks like the template has lost its CSS styling. Maybe a corrupt file during installation? You could also try clearing your browser cache (that would be my first bet).

Like @Maxime_GRIMLER said if you’re using a custom template to generate the PDFs you may need to update its styling.

However if you’re using a default template you may try downloading the IP files again and replacing the PDF template files only - just in case it is corrupt or something.

i redownloaded IP, reuploaded all files, still no css styling.

If you want i can give you a login for you to try? i’m out of ideas.

No no no need of your credentials.

Can you please paste your PHP file template in https://pastebin.com/
Maybe someone can check and help you by seeing if there is missing styles or test on his own.


You mean it’s the default one in used ? Because I see no changes, I test it and no problem for me.

Can you provide me your logo ? Maybe that’s the reason otherwise I don’t see any problem for me on your template (and I test by downloading invoice and send it by mail)

I’m actually in hospital at the minute (that’s what they call dedication :wink:) so have no access to my lab environment at the minute.

So I’ll leave you with @Maxime_GRIMLER

But just to confirm you have tried clearing your browser cache? As obviously it’s working when he tests it?


Problem was in my ipconfig.php,

i still had the url to the temp domain in IP_URL=
but i was allready accessing the site from the correct URL i didnt find the problem immediately because everything was working correctly.

1 Like

Ergz ok ok then hard to find from our point of view :smiley:

Glad to hear it works now :slight_smile: Have some fun with InvoicePlane now :stuck_out_tongue:

1 Like

But its a good comment to keep in mind if people have the same problem :slight_smile:

continuing from:

PDF not generated correctly

Hi I have developed the same symptoms.

Debian 9
php 5.6.30…

Changes to system:
Normal updates to OS last at 2017-12, but problem started 2017-10-20 (y-m-d)
while using IP 1.5.2 now upgraded to 1.5.5 with the same problem.

Problem statement:
1.) PDFs were being created correctly for a few months.
2.) With no deliberate change to IP.
3.) As per the preceding post examples
All pdf’s became left justified.
Alternate lines are no longer highlighted differently.
Bold characters are not bold.


  1. Content ok,
  2. Formatting lost.

Corrective actions:

as per Customising Templates


print_r($html);exit; at line 98 for invoice templates.

my one was line 103, before



If I tried to download a pdf an html version of the pdf was displayed,
other than the logo not showing (assume hyper link not created for pdf)
the layout was correct in html view.

I also deleted the logo with the same results when the pdf was generated.

I reset user permissions (as test)
User: www-data
Group: www-data


Any suggestions.


Snapshot of PDF

Snapshot of html version (pdf download selection, but with debug option)

If it counts!

I am hosting 3 sites (4 with the test) on the same server. All are showing the same symptoms.
my own and two instructor friends.

The sites are kept separate by virtue of using 4 separate directory with 4 DB’s under mysql and
4 conf files under /etc/apache2/conf-available/…