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.
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 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.
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.
print_r($html);exit; at line 98 for invoice templates.
(
PS
my one was line 103, before
$CI->load->helper('mpdf');
)
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
It failed!
Confirming that the style sheet is not accessible via https FROM the SERVE ITSELF but is available to external web clients, how can I change the reference to the css to a file system path like the logo.
PS the server has always served two domains internal/external.
An internal self signed htmls server named ‘zeus.xyz’, and a public name
I assume that some update has changed the ‘context’ under which the mpdf call is being made. so while the web client is being served from the external name the call to fetch the css is being done from the ‘inside network’ using the outside name, resulting in a name resolution error.
I think this is rather a configuration problem with the web server as mPDF is working for like thousands of installations without any problems.
You could try to completely remove the domain from the CSS link:
Yet to be done:
change paths so that it works as per the invoice_logo_pdf() method ie paths must not be hard coded, but use IP variables.
can you give me a hint to get.
/var/www/invTest/ (IP variable / PHP)
PS php manual recommends using readfile() as apposed to include() due to security conserns, so I will experiment with that.
PPS I would switch to this method not because it is better, but because it works the same way as invoice_logo_pdf() which means fewer methods are being used in one program therefore less chance of that one out of the blue instances like mine.