SimpleInvoices Group Forum › Forums › Fearless359 SimpleInvoices Discussion Group › PDF generation urlsafe/htmlsafe
- This topic has 23 replies, 2 voices, and was last updated 4 years ago by RRowley.
-
AuthorPosts
-
November 11, 2020 at 5:31 am #1192ExpertGeeksParticipant
I can’t post my main issue with the upgrade as the bot check is blocking me from posting that. I also have found the following issue when using my invoice template.
When generating PDF’s I get complaints that urlsafe and htmlsafe are unknown modifiers. It appears they have been removed, which has broken my invoicing template.. When removing all references to both in the template or I change the invoice template back to the ‘default’ I get the following error;
[11-Nov-2020 12:59:22 Europe/London] Pdf::generate(): exception – Invalid input characters. Did you set $mpdf->in_charset properly?
November 11, 2020 at 8:09 am #1193ExpertGeeksParticipantSorry, I should have added that this is the latest version of 2020; Version: 2020.0.06 — 20201109
November 11, 2020 at 8:42 am #1194RRowleyParticipantIn tpl files use urlSafe and htmlSafe with this letter case.
November 11, 2020 at 12:06 pm #1195ExpertGeeksParticipantThanks for the follow-up. I edited as directed, but I’m getting the following now;
[11-Nov-2020 20:04:37 Europe/London] Export::getData() – invoice – error: Syntax error in template “file:/var/www/html/sinv2020/simpleinvoices-master_2020/templates/invoices/eg-invoice/template.tpl” on line 161 “<td class=”” style=”text-align:right;” colspan=”3″>{$invoice.date|siLocal_date}</td>” unknown modifier ‘siLocal_date’
[11-Nov-2020 20:04:37 Europe/London] Export::showData() – No data to report.What has siLocal_date been changed to ?
- This reply was modified 4 years, 1 month ago by ExpertGeeks.
November 11, 2020 at 12:15 pm #1197ExpertGeeksParticipantsorry, found it; utilDate
November 11, 2020 at 12:34 pm #1198ExpertGeeksParticipantI compared to the default/template.tpl and replaced all the ‘unknown modifier’s. I can get a print preview to appear, although ‘Address:’, ‘Phone:’, ‘Mobile:’, ‘F.A.O’ and ‘Total:’ aren’t being generated and now appear as colons (If I recall correctly, I suspect these were changed in the language file).
Don’t know why ‘Address’ or ‘Total’ don’t appear as they’re the same, but Phone = Ph., Mobile = Mob., F.A.O = Attn.The GBP pound sign has been replaced with �.
Also, I can’t output a PDF.. I’m getting;[11-Nov-2020 20:26:16 Europe/London] Pdf::generate(): exception - Invalid input characters. Did you set $mpdf->in_charset properly?
in php.log
- This reply was modified 4 years, 1 month ago by ExpertGeeks.
November 11, 2020 at 3:49 pm #1201ExpertGeeksParticipantI’d love to be able to edit the posts, but it is what it is 😀
I’ve now fixed up the template (with the assistance of the language file lang.php) and it shows the correct labels on all the fields of my invoice template (yay!).. but I still have � instead of £ in the print preview, despite having pound signs on the edit and view pages. I still get a blank page when I try to generate a pdf and the error;
[11-Nov-2020 23:47:26 Europe/London] Pdf::generate(): exception - Invalid input characters. Did you set $mpdf->in_charset properly?
in php.log
Help gratefully recieved ! Thanks.
November 12, 2020 at 7:07 am #1202ExpertGeeksParticipantI’ve also noticed that the date is in the wrong format too.. it should be 12/08/2020, not 08/12/2020.
Attachments:
November 12, 2020 at 8:08 am #1204RRowleyParticipantCan you zip and attach the template directory? Then I can test what you have. I need an image of your INV PREFS for Invoice record and the custom.config.ini settings for: localLocale, localCurrencyCode & localPrecision.
November 12, 2020 at 8:39 am #1205ExpertGeeksParticipantHere you go;
localLocale = en_GB
localCurrencyCode = GBP
localPrecision = 2- This reply was modified 4 years, 1 month ago by ExpertGeeks. Reason: add screenshot
November 12, 2020 at 9:33 am #1209RRowleyParticipantThe templates.zip file is empty. Also, access the Inv Pref Invoice records in edit mode and give me that screen shot.
November 12, 2020 at 4:56 pm #1210ExpertGeeksParticipantWe’re halfway there! I got the � instead of £ in Inv Prefs and amended that to
£
which now shows the pound sign correctly in the print preview (shown in capture.jpg). Unfortunately, still unable to generate a pdf with the same error.
Apologies for the empty zip, forgot the recursive switch when zipping the directory. N.B. Same pdf problem regardless of template, default or eg-invoice- This reply was modified 4 years, 1 month ago by ExpertGeeks.
November 14, 2020 at 5:31 am #1214RRowleyParticipantCouple of questions:
1) In the INV PREFS currency sign field, did you set the sign by entering this code: & # 163; (spaces suppressed)?
2) Are you using the eg-invoice template from the zip file?I’ve done both these, set same values as you in custom.config.ini and set en_GB as Language and Locale fields in the INV PREFS. Using this both the default and the eg-invoice templates work correctly.
November 14, 2020 at 8:05 am #1217ExpertGeeksParticipantN.B. Pound sign issue resolved as I mentioned above. The pound sign was changed to � in Inv Prefs during the upgrade to 2020. It was correct in the 2019 versions. Manually changing it fixed that.
In answer to your questions;
1) Yes.
2) Yes and default has the same issue. I cannot generate a pdf with either. The error is;Pdf::generate(): exception - Invalid input characters. Did you set $mpdf->in_charset properly?
- This reply was modified 4 years, 1 month ago by ExpertGeeks.
November 14, 2020 at 8:13 am #1219ExpertGeeksParticipantGah, the few minutes to edit a post is pretty frustrating..
I just wanted to add that print preview, and export to xls and doc are working.
-
AuthorPosts
- You must be logged in to reply to this topic.
Recent Comments