7

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
  • 1
    Not an answer to your particular question, but a suggestion based on your use case: Check out PhantomJS. It's a free headless WebKit browser controlled via simple JavaScript logic, and can save directly to PDF and image formats like PNG. You would simply create a page that renders the desired information with HTML/CSS, then invoke PhantomJS to grab the page and render a PDF out of it. It's far more reliable than most "HTML to PDF" converters. – Agop Dec 21 '16 at 15:21
6

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

3

By default magento using ZEND_PDF to customization on pdf invoice,order and shipment.

You have to refer link for more customization of your task,

You can start from here,

Zend Pdf Customization Basics Link

Thanks.

3

By default magento uses Zend_Pdf here is sample fo creating your own pdf

simple zend pdf file not generate in magento

If you want to use third party library then i recommend use the tcpdf library it is easy to use.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.