Is there a table in the database or a folder where Magento (1.9 and 2.1) stores Pdf Invoices?
2 Answers
Magento doesn't store PDF files, it generates PDF on demand.
It keeps all the required data in different tables and compose the PDF based on configurations and PDF template.
-
Thanks! Do you know the name of the events (admin panel and user panel) called when the pdf is shown? I want to create an observer and show another pdf.– VixentCommented Apr 13, 2017 at 13:36
-
You'll find pdf directory in model of sales module. There is a PHP file which renders the pdf, you can extend that renderer and customize the pdf as you want. Commented Apr 13, 2017 at 13:58
-
Thanks for updating knowledge. I also came to know about it by your answer. Commented Apr 13, 2017 at 14:09
-
-
@Arman It's a good solution. But I simply want to open a pdf file (that I generate before) saved in a folder. I was trying to override the method getPdf of \Magento\Sales\Model\Order\Pdf\Invoice.php but it doesn't work (at least in magento 2.1).– VixentCommented Apr 13, 2017 at 14:28
-
Any of the module doesn't export invoices which is requirement here. Commented Apr 13, 2017 at 13:18
-
Yes that generates reports. But I thought they might help. Thanks for updating knowledge Commented Apr 13, 2017 at 14:08