PDF generation urlsafe/htmlsafe

Viewing 15 posts - 1 through 15 (of 24 total)
  • Author
    Posts
  • #1192
    ExpertGeeks
    Participant

    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?

    #1193
    ExpertGeeks
    Participant

    Sorry, I should have added that this is the latest version of 2020; Version: 2020.0.06 — 20201109

    #1194
    RRowley
    Participant

    In tpl files use urlSafe and htmlSafe with this letter case.

    #1195
    ExpertGeeks
    Participant

    Thanks 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 3 years, 5 months ago by ExpertGeeks.
    #1197
    ExpertGeeks
    Participant

    sorry, found it; utilDate

    #1198
    ExpertGeeks
    Participant

    I 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 3 years, 5 months ago by ExpertGeeks.
    #1201
    ExpertGeeks
    Participant

    I’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.

    #1202
    ExpertGeeks
    Participant

    I’ve also noticed that the date is in the wrong format too.. it should be 12/08/2020, not 08/12/2020.

    Attachments:
    #1204
    RRowley
    Participant

    Can 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.

    #1205
    ExpertGeeks
    Participant

    Here you go;

    localLocale = en_GB
    localCurrencyCode = GBP
    localPrecision = 2

    • This reply was modified 3 years, 5 months ago by ExpertGeeks. Reason: add screenshot
    #1209
    RRowley
    Participant

    The templates.zip file is empty. Also, access the Inv Pref Invoice records in edit mode and give me that screen shot.

    #1210
    ExpertGeeks
    Participant

    We’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 3 years, 5 months ago by ExpertGeeks.
    #1214
    RRowley
    Participant

    Couple 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.

    • This reply was modified 3 years, 5 months ago by RRowley.
    • This reply was modified 3 years, 5 months ago by RRowley.
    #1217
    ExpertGeeks
    Participant

    N.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 3 years, 5 months ago by ExpertGeeks.
    #1219
    ExpertGeeks
    Participant

    Gah, 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.

Viewing 15 posts - 1 through 15 (of 24 total)
  • You must be logged in to reply to this topic.