Answer the question
In order to leave comments, you need to log in
PHP: HTML to PDF (invoice from 1C)
Good afternoon!
I need to convert an invoice from 1c HTML format to PDF. The application within the framework must be able to do this.
I tried Dompdf - it did not take off, __autoload conflict, nothing worked when manually connecting classes. I launched it separately - it converts invoices with the left encoding and breaks the format.
I tried mPDF - it doesn't fuss at all.
xhtml2pdf under Ubuntu screwed everything up.
API solutions with access to external hosts are not suitable, because paranoia is for the internal contract automation system
Ideally converted only the wkhtmltopdf thing. But somehow I don’t want to drive it from PHP.
Maybe there is some proven solution that I stupidly didn’t see with a blurry eye in a couple of hours of trials and searches?
Answer the question
In order to leave comments, you need to log in
Approximately the same task arose, I didn’t find anything better than wkhtmltopdf, there are almost no problems with it in appearance, although its connection to X led to the following construction: export DISPLAY=:0.0 && wkhtmltopdf -O Landscape -s A4 --zoom 1.2 -L 5 -R 5 "$f" "$f".pdf
We have implemented this through a PDF printer. Everyone is used to it, everyone is comfortable.
Please do not use Dompdf, there is a hole. Our site was hacked through dompdf.
Recently there was the same task - to generate reports in PDF - I solved it through pdflatex.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question