PDF generation urlsafe/htmlsafe

Viewing 9 posts - 16 through 24 (of 24 total)
  • Author
    Posts
  • #1224
    RRowley
    Participant

    Sorry that edit is difficult. Not an issue for me.

    Anyway, wanted you to try something. Delete the tmp/pdf_tmp directory. Then generate a pdf. Should recreate the directory and set up new font data. Let me know how it works.

    • This reply was modified 4 years, 1 month ago by RRowley.
    #1226
    ExpertGeeks
    Participant

    Yup, that’s got it! Cheers 🙂

    #1253
    ExpertGeeks
    Participant

    I’m doing some invoicing today and the export to PDF isn’t working again. I get a blank white screen when I hit ‘Export to PDF’. There’s nothing written to si.log, or php.log since November when we last looked at this. Nor is there anything relevent written to the apache error.log or the mysql error.log. I have tried deleting tmp/pdf_tmp and although the directory gets created, there’s nothing written into it.

    I tried using the default template too, so it’s not related to that. I’ve made no changes to the pound symbol settings in the interim. The only things that have happened in the interim are server updates and a reboot. The only folders written to recently are; public and tmp. public is empty.

    Do you have any idea where I should look ?

    #1254
    ExpertGeeks
    Participant

    I tried setting up a fresh instance with a new database and got the following error during the database creation;

    Fatal error: Uncaught TypeError: Return value of Inc\Claz\Db::query() must be of the type bool or null, object returned in /var/www/html/sinv2020.1/simpleinvoices-master_2020/Inc/Claz/Db.php:134 Stack trace: #0 /var/www/html/sinv2020.1/simpleinvoices-master_2020/modules/install/structure.php(16): Inc\Claz\Db->query() #1 /var/www/html/sinv2020.1/simpleinvoices-master_2020/index.php(440): include(‘/var/www/html/s…’) #2 {main} thrown in /var/www/html/sinv2020.1/simpleinvoices-master_2020/Inc/Claz/Db.php on line 134

    #1255
    ExpertGeeks
    Participant

    I’ve gone back to the installation instructions and am running through the ‘Export to PDF’ setup. There isn’t a pdf directory in .library/ are these instructions for an older version or should this directory still be present ? Creating and making that and pdf/fpdf writable by the apache user didn’t help.

    GD support is enabled.

    #1257
    ExpertGeeks
    Participant

    New install didn’t complete, the database was broken. While I could create products and customers, I couldn’t select either when generating an invoice.

    I did as the ‘installation’ doc suggests when you have ‘Problems with the Simple Invoices installer?’ and imported the supplied database. This imported database IS able to generate PDF’s. However, when I went to try to check whether I could change the currency etc in ‘SI Defaults’ I get the following error;

    Fatal error: Uncaught TypeError: Return value of Inc\Claz\SystemDefaults::getDelete() must be of the type int, string returned in /var/www/html/sinv2020.1/simpleinvoices-master_2020/Inc/Claz/SystemDefaults.php:216 Stack trace: #0 /var/www/html/sinv2020.1/simpleinvoices-master_2020/modules/system_defaults/manage.php(28): Inc\Claz\SystemDefaults::getDelete() #1 /var/www/html/sinv2020.1/simpleinvoices-master_2020/index.php(440): include(‘/var/www/html/s…’) #2 {main} thrown in /var/www/html/sinv2020.1/simpleinvoices-master_2020/Inc/Claz/SystemDefaults.php on line 216

    Error in tmp/log/php.log
    [03-Dec-2020 04:56:31 America/Los_Angeles] PHP Fatal error: Uncaught TypeError: Return value of Inc\Claz\SystemDefaults::getDelete() must be of the type int, string returned in /var/www/html/sinv2020.1/simpleinvoices-master_2020/Inc/Claz/SystemDefaults.php:216
    Stack trace:
    #0 /var/www/html/sinv2020.1/simpleinvoices-master_2020/modules/system_defaults/manage.php(28): Inc\Claz\SystemDefaults::getDelete()
    #1 /var/www/html/sinv2020.1/simpleinvoices-master_2020/index.php(440): include(‘/var/www/html/s…’)
    #2 {main}
    thrown in /var/www/html/sinv2020.1/simpleinvoices-master_2020/Inc/Claz/SystemDefaults.php on line 216

    FYI Linux installation,
    PHP Version 7.4.9
    Server version: Apache/2.4.46 (Ubuntu)
    Server built: 2020-08-10T12:32:00

    #1258
    RRowley
    Participant

    Check the setting in system_defaults for the record with name “delete”. It must have a value of 0 or 1.

    #1259
    ExpertGeeks
    Participant

    The default database has a default delete value of ‘N’. I’ve changed it to 1 and now I can edit the system defaults. This version can print to PDF so the environment is capable of printing PDF’s. I’ve switched to my database and can print PDF’s from this too (hooray). Thanks Richard.

    #1261
    RRowley
    Participant

    Thank for finding the issue. I’ve fixed it for the next update I provide.

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