Hello,
testing the live demo on a mobile/tablet i press the 'print invoice' on the invoice form: this result in a incorrect pdf document.
Contents of pdf is (text): <b>FPDF error:</b> Incorrect orientation:
On PC desktop i get a real correct pdf.
Android 4.2.2 and 5.1.1. Chrome and Android Explorer (popup blocker disabled)
Regards, Marcel
Welcome to the nuBuilder forums!
Please register and login to view forums and other content only available to registered users.
Please register and login to view forums and other content only available to registered users.
Live demo: print invoice -> pdf error on android mobile
-
- Posts: 1
- Joined: Mon Dec 07, 2015 1:47 pm
-
- Posts: 79
- Joined: Thu Oct 20, 2011 9:13 pm
Re: Live demo: print invoice -> pdf error on android mobile
I had the same issue.
I tracked the problem and I found that it was due to a double download of dynamically generated content on android devices as mentioned in this post:
https://code.google.com/p/android/issues/detail?id=1978
In this version of nuBuilder, the hash data required to create the pdf file is erased after the fisrt download call for the file. Therefore on the second download call there are no hash data available to generate the pdf file.
I was able to make it work by replacing line 20 of nurunpdf.php file from:
to:
This will keep the required hash data to create the pdf file on the database for 2 days. Of course, the disadvantage is that there will be a lot of unnecessary data stored on the database.
I hope someone finds a better solution for this problem with this information.
KInd regrads,
Fike
I tracked the problem and I found that it was due to a double download of dynamically generated content on android devices as mentioned in this post:
https://code.google.com/p/android/issues/detail?id=1978
In this version of nuBuilder, the hash data required to create the pdf file is erased after the fisrt download call for the file. Therefore on the second download call there are no hash data available to generate the pdf file.
I was able to make it work by replacing line 20 of nurunpdf.php file from:
Code: Select all
nuRunQuery("DELETE FROM zzzsys_debug WHERE zzzsys_debug_id = ? ", array($jsonID));
Code: Select all
nuRunQuery("DELETE FROM zzzsys_debug WHERE deb_added < DATE_SUB(NOW(), INTERVAL 2 DAY)");
I hope someone finds a better solution for this problem with this information.
KInd regrads,
Fike