I am facing a problem to separate the products images in pdf invoice in Magento 2.x. How can I fix the image size to separate the multiple order item's images?
Also, I want to make the invoice id to Barcode. Please check my attached images.
1. ivoice.png where you can the issues for products images which I want to separate it according to 2nd image.
2. invoice 2.png which pdf invoice I want to make. Invoice 2.png this invoice design I want to get.
Please help me to solve this issue.
Thanks
Best Answer
I'll take a stab at question #1 to include the invoice barcode in the pdf header. The header is draw in
Magento\Sales\Model\Order\Pdf\Invoice::insertDocumentNumber
which currently uses the function from the parent classMagento\Sales\Model\Order\Pdf\AbsractPdf
. A plugin can be used fro adding the invoice barcode.Vendor/Module/etc/di.xml
Vendor/Module/Plugin/Invoice.php
Sample output: