Magento 1.9 – What PDF Plugin is Used to Generate Invoices?

magento-1.9pdf

I need to provide an option for sellers/vendors to download their order information like name, sku, price, qty, etc. in PDF format on a custom page.

I am planning to use any PDF plugin as mentioned in link1 or in link2. I wanted to know which PDF plugin Magento uses to generate invoices [ sales > orders ] in PDF format.

I mean which one of the following does Magento use?

  • ApacheFOP
  • dompdf
  • FPDF
  • html2ps
  • mPDF
  • PDFlib
  • TCPDF
  • wkhtmltopdf
  • Zend_Pdf

Best Answer

Magento does not use any plugin to generate the pdfs. It uses Zend_Pdf.
You can take a look at all the classes in here and see how it's done.
Unfortunately Zend_Pdf is not something magical. It requires a lot of work and some knowledge of geometry.
It is like drawing something on a canvas. You ca use methods as drawRectangle or drawText to actually place your elements on the page.
You can find a more detailed documentation about Zend_Pdf here

Related Topic