Just a question. My frontend button on the customer dashboard to print an invoice prints the page itself and not the PDF of the invoice.

Anyone any idea if there is a quick fix or a setting for this?

How it looks now :

How it not should be

How the pdf looks when printed from admin:

enter image description here


By default Magento, the Front page doesn’t generate PDF for order. So, there is no a quick fix or setting. We need to build a custom one (can try with domPdf library). When allowing customer generating PDF, we should create a cron job to clear the generated files.

| improve this answer | |
  • good point about the 'clear' part but shouldn't magento need to save the invoice fille location and only create a new one if that one does not exist instead of creating new ones? – CompactCode Dec 3 '17 at 15:39
  • Also i don't get why i need to build a new PDF just for the frontend. I made a custom PDF for the backend so shouldn't i just need to enable that on the frontend then? – CompactCode Dec 3 '17 at 15:40
  • Not test yet. But seem that Magento always create a new PDF file. – Khoa TruongDinh Dec 3 '17 at 15:44
  • Hmmn i think it would be for the benefit for the community if we maybe could come up with an opensource module that not only doesn't create duplicate PDF's (unless updated) but also prints it on the frontend. Its just such a standard feature.. – CompactCode Dec 3 '17 at 15:53

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.