Git Product home page Git Product logo

Comments (5)

bretvanhorn avatar bretvanhorn commented on September 24, 2024

Just an update, zeroing in on the cause, I think. I did some debugging from the vendor files and was able to output the chrome command so I could run it manually. I was able to output the $input variable in ProcessUtil.php, save it to a text file, then run the below command:

node "/home/forge/[redacted]/vendor/spiritix/php-chrome-html2pdf/src/Spiritix/Html2Pdf/../../../index" -o '{"landscape":false,"printBackground":true,"displayHeaderFooter":false,"mediaType":"screen"}' < tmp.txt > tmp.pdf

This outputs a PDF with the data from our Laravel view.

Strange thing is, I can view the $input variable in executeShellCommand() and it shows the valid HTML from our Laravel view, but once it is run through proc_open, that seems to be where the error in my post above kicks in. If I output the $result['output'] value, it just comes back as "".

I'm going to keep digging, but welcome any guidance.

from php-chrome-html2pdf.

bretvanhorn avatar bretvanhorn commented on September 24, 2024

Update: completely uninstalling and reinstalling/downgrading to v1.6.1 fixes the issue.

from php-chrome-html2pdf.

spiritix avatar spiritix commented on September 24, 2024

Might be fixed in the latest release, can you please verify?

from php-chrome-html2pdf.

thunder809 avatar thunder809 commented on September 24, 2024

Hello,
i have the same issue.

We are using your package for pdf generation in a magento2-module.
Node v18, same error, on the current version of the package (1.7.6).

I dont´t have more insights on the specific system an OS of the customer, as i only have very limited access.

Workaround with downgrade to version 1.6.4 worked for me.

from php-chrome-html2pdf.

spiritix avatar spiritix commented on September 24, 2024

@thunder809 Did you try to use the latest version 1.7.6? This was a known issue on 1.7.5.

from php-chrome-html2pdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.