How can I generate PDF from HTML without the PDFlib library?

I need to dynamically generate PDF from HTML, but I have PDF Support disabled on my hosting, so can I do without the PDFlib GmbH library?

thanks

+4
source share
4 answers

The most common alternative is FPDF . This is pure PHP and does not need installed extensions.

+2
source

There are many packages, but as I understand it, you cannot install additional libraries on your hosting. The options will be FPDF if you want to rewrite all the HTML code into blocks, TCPDF if you feel a little less masochistic, which has limited html / css support.

+3
source

Another nice option is dompdf , which is an HTML to PDF converter and is almost compatible with CSS 2.1. It can be used either using PDFLib or with the CP class CPDF class.

+2
source

You can also check htmldoc:

Project page

0
source

Source: https://habr.com/ru/post/1311956/


All Articles