magento / community-features

Magento Features Development is an Initiative to Allows Community Memebers Join to Development of Magento Features
46 stars 18 forks source link

Use a tool like dompdf instead of Zend_Pdf to generate PDFs #89

Closed jayankaghosh closed 3 years ago

jayankaghosh commented 5 years ago

Preconditions

Magento 2.x

Problem

Magento uses the Zend_Pdf library to generate PDFs for order, invoice etc. This makes it really difficult to modify the PDF template without writing preferences to the actual classes and doing pixel-specific calculations

Proposed Solution

The PDFs should be rendered from HTML using any tool like dompdf to convert the HTML to PDF. This HTML should again, be using a layout handle, like order_invoice_pdf where the current invoice should be passed as a Registry Item, making it a lot easier to modify the PDFs

sivaschenko commented 3 years ago

Closed as a duplicate to https://github.com/magento/community-features/issues/49