In an E-commerce Businesses, order emails & E-Documents provide evidence that products or services are sold to the customers. However, for tax purposes, it is essential to record and maintain all sales details. In this digital world, things changed with a time where store owners manually kept track of everything. Instead, now it’s easier to rely on Various CMS’s that automate the whole process & save times, efforts by going green.

In Magento 2, managing all these things are as easy as pie. Once an order is placed by customer all you can quickly generate an invoice, shipment, credit memo, and order pdf just by clicking a button. Also, it sends an email notification to both store customer and admin. Besides all of these things, Magento provides an option to generate and download order PDF that holds complete information of the buyer, seller as well as a product that has been sold. Because every business is different, the store owner has to modify all these E-Documents according to their business needs, after all, it served as evidence and provides legal protection for both parties. So, we are back with another blog series that will help you expand default Magento Order PDF by adding some more useful elements to pdf.

Here, we have added PAN number of the admin below every Invoice number and displayed buyer PAN Number with Billing & Shipping Address inside PDF. To do the same follow these pretty steps that will help you to change order PDF Format in Magento 2.

To do the same, first we need to override model of invoice PDF inside our custom extension folder.
app\code\Vendor\Extension\etc\adminhtml\di.xml

Now you need to create model file named ‘invoice.php’ and paste below code inside that file.
app\code\Vendor\Extension\Model\Order\Pdf\Invoice.php

And that’s it! We have successfully added PAN number to order PDF as we needed. You can use this code according to your need for adding or one or more elements to your Order PDF.

If you need any help regarding this code, simply leave a comment below and don’t forget to smash that stars if you found this blog helpful.

Happy Coding!

Click to rate this post!
[Total: 11 Average: 4.6]