• Resolved caltutxo

    (@caltutxo)


    Hi!

    since uploaded to 2.xx version, every invoice or packaging I generate (created with old version or new) doesn’t open.

    Chrome says “There is an error opening PDF” and Adobe too.

    Only when opening with a Mac over Previeww app it works.

    Debugging is Off and tried switching opening in a browser or generating file.

    Thank you for helping!!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    Hi! It’s possible that there are PHP errors written in the PDF data (resulting from your PHP settings or WP_DEBUG or rather than the ‘Debug output’ option in the plugin), I’ve seen this with another user too. Try opening the PDF in a plain text editor to see if this is indeed the case. Here’s what I found in the other case:

    
    Warning: file_exists(): open_basedir restriction in effect. File(/tmp/log.htm) is not within the allowed path(s): ([...]) in /wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Dompdf.php on line 699
    Warning: is_writable(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): ([...]) in /wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Dompdf.php on line 699
    Warning: is_writable(): open_basedir restriction in effect. File(/tmp/log.htm) is not within the allowed path(s): ([...]) in /wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Dompdf.php on line 704
    Warning: is_writable(): open_basedir restriction in effect. File(/tmp/log.htm) is not within the allowed path(s): ([...]) in /wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Dompdf.php on line 850
    

    This particular error will be fixed with the next update. If you don’t mind editing plugin files yourself, check this commit:
    explicitly set log file for dompdf (otherwise defaults to system tmp folder)

    Let me know what you find!

    Thread Starter caltutxo

    (@caltutxo)

    Thank you so much for your quick answer.

    I have downgraded to 1.6.6 and working fine.

    Will wait for next update.

    Thanks a lot Ewout!

    Plugin Contributor Ewout

    (@pomegranate)

    Can you still open the PDF in a plain text editor to see if it has PHP errors like the ones above? That way we can be certain that you are having this same issue. If your issue is different, the update may still not solve it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Adobe and Chrome doesn’t open PDF’ is closed to new replies.