• Resolved Jeroen de Jager

    (@anotherdutchman)


    I keep getting a FATAL ERROR when creating a PDF

    I increased the WP memory limit to 768M, but the status still tells me it is at 40M
    I turned on the Debug function, but nothing changed
    I set the output to HTML, this looks fine (no problem)
    The PDF send as an attachment to the customer is also looking fine

    The message I get is :
    Fatal error: Uncaught DOMException: Invalid Character Error in /home/disho219/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/lib/html5lib/TreeBuilder.php:3191 Stack trace: #0 /home/disho219/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/lib/html5lib/TreeBuilder.php(3191): DOMElement->setAttribute(‘offertes,’, ”) #1 /home/disho219/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/lib/html5lib/TreeBuilder.php(906): HTML5_TreeBuilder->insertElement(Array) #2 /home/disho219/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/lib/html5lib/Tokenizer.php(2456): HTML5_TreeBuilder->emitToken(Array) #3 /home/disho219/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/lib/html5lib/Tokenizer.php(731): HTML5_Tokenizer->emitToken(Array) #4 /home/disho219/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/ in /home/disho219/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/lib/html5lib/TreeBuilder.php on line 3191

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter Jeroen de Jager

    (@anotherdutchman)

    What the F**….. I just removed the h2 codes around my footer text and it is now working fine….

    Is there a way to make the footer text in a smaller italic font ?

    Kind regards
    Jeroen

    Plugin Contributor Ewout

    (@pomegranate)

    Hi Jeroen,
    Can you post the exact code you used for the footer (with those h2 codes)? The dompdf library isn’t as forgiving with HTML as the browser, so there may be an error there that is not visible in HTML output.

    Ewout

    Thread Starter Jeroen de Jager

    (@anotherdutchman)

    Hi Ewout

    I’m not a programmer but I used : <h2> Blablabla </h2>

    I was hoping to get the footer text in a smaller font and in Italic, but I have looked at the css sheet of your plugin and saw that all the text has the same style and I cannot change the footer text without changing everything else

    Kind regard
    Jeroen de Jager

    Plugin Contributor Ewout

    (@pomegranate)

    Hello Jeroen,
    Was ‘Blablabla’ the actual text you used? This is important ??
    Was there anything else in the footer too?
    I tested with exactly

    
    <h2> Blablabla </h2>
    

    In the footer settings field and it works fine!
    Did you also apply any CSS styles to this h2?

    Any specifics that you can provide may help solve this issue!

    Ewout

    Thread Starter Jeroen de Jager

    (@anotherdutchman)

    Ewout,

    ?? no it was not blabla…

    The complete text was :
    Op al onze offertes, opdrachten en op alle met ons afgesloten overeenkomsten zijn onze Algemene levering- en verkoop voorwaarden van toepassing zoals gedeponeerd bij de K.v.K. Midden-Nederland onder Nr. : 61838357. Deze voorwaarden worden, indien gewenst, kosteloos aan u verzonden en zijn tevens voor een ieder te downloaden en/of in te zien op https://www.disho.nl/Algemene voorwaarden

    Voor aankopen gedaan via onze webshop, geldt het herroepringsrecht, zie hiervoor : https://www.disho.nl/pages/retour-beleid

    I made a copy of all the style files and put them into my child theme folder (exactly as discribed) but I see no effects on my PDF when I change the side margins and header color.
    I did not make any changes to h1-h2-h3-etc

    Kr
    Jeroen

    Thread Starter Jeroen de Jager

    (@anotherdutchman)

    Ewout

    I used the original CSS file to make the changes I need in the footer text ( so I don’t need to use the <h2> and <i> codes anymore.
    Only problem is that this is the original CSS file, so when any update will come, it probably will be overwritten

    As mentioned, I have copied all files to my child theme, but I cannot select this in the WP “choose your template”… only selection I can make is the original template.

    Kr
    jeroen

    Plugin Contributor kluver

    (@kluver)

    Hi @anotherdutchman,

    If you only like to change the CSS of a template you can use custom styles as described here: Using custom styles

    This is in your case probably the best way to go.

    If you rather want to create a correct custom template you can follow our guide: Creating a custom PDF template

    Both options will make sure all your changes will not be overwritten when it’s time to update.

    Hope this helps you in the right direction!

    With kind regards,

    Michael

    Thread Starter Jeroen de Jager

    (@anotherdutchman)

    Hi Michael

    I already made a custom PDF template according to the guide…
    But I still can only select the “Simple” template in the settings

    I copied the “simple files to :
    /public_html/wp-content/themes/flatsome-child/Woocommerce/pdf/My Template

    Kr
    Jeroen

    Plugin Contributor Ewout

    (@pomegranate)

    Hello Jeroen,
    That’s quite strange… Is it ‘Woocommerce’ as in your example, or ‘woocommerce’ (the latter would be preferred, most servers are case sensitive)? Also note that you should copy ALL template files, not just the CSS file.
    It’s possible that your server does not allow reading the directory contents, you should see this on the Status tab of the PDF Invoice settings “glob() Required to detect custom templates and to clear the temp folder periodically”.

    Ewout

    Thread Starter Jeroen de Jager

    (@anotherdutchman)

    Hi Ewout

    I just changed the capital letter (from woocommerce) into a low case letter and now I finally see my custom template

    This problem seems to be fixed….
    Thanks for the help

    Kind regards
    Jeroen

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Fatl Error’ is closed to new replies.