Creating a PDF File Using Zend Framework 2

I started studying ZF2 right now and notice that there is no “Zend_Pdf” or similar in zend framework 2 ...

How can I create pdf in this version of the framework?

Does anyone know a good tutorial?

+4
source share
3 answers

Zend Framework 2 has moved many of the older Zend Framework libraries from the core kernel and created modules. Zend_Pdf is one of the libraries that have been moved to the module. You can find them all in the Zend Framework repository on GitHub .

You need the ZendPdf package, just follow the instructions on the page. The documentation is not ready yet, because it is not the main module. Documentation is likely to follow as soon as all errors are processed using the main material.

Also see the Zend Framework package repository .

+11
source

If you need to create a PDF file in ZF2, a short tutorial on how to do this with PD4ML . The approach does not require programming a PDF layout (e.g. createPdfDocument (), startParagraph (), addImage (), etc.). It simply converts the existing rendered view (HTML + CSS + SVG + images) to PDF or possibly to RTF.

0
source

If you need a module that allows you to easily sketch, snapshot or generate PDF from a URL or html, you can take a look at MvlabsSnappy based on the Snappy PHP shell (5.3+) for the wkhtmltopdf and wkhtmltoimage utilities .

0
source

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


All Articles