Closed bretvanhorn closed 2 months ago
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.
Update: completely uninstalling and reinstalling/downgrading to v1.6.1 fixes the issue.
Might be fixed in the latest release, can you please verify?
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.
@thunder809 Did you try to use the latest version 1.7.6? This was a known issue on 1.7.5.
Hi-
Our PDF generation is suddenly failing on our staging server after working great for the last several months. I suspect this happened after we upgraded from Ubuntu 18 to 20, but I may be mistaken.
We are running:
Here is the full error:
And the code we use:
What I have tried:
Any help is appreciated. I can't seem to find anyone with this exact error here or on the web, so I'm at a loss. Thanks.