Web Analytics

Fill the form & Get Installation Support

How to print barcode on invoice PDF?

One of our clients was looking to add the Barcode using OrderIncrement id.

To achieve that I used picqer/php-barcode-generator library in Magento. You can follow the remaining steps only after installing the library.

Step 1: Create a Plugin and define that plugin di.xml. Use the below code and add it to the di.xml file.

Step 2: Create a Invoice.php file under Plugin under this folder “app/code/Magemonkeys/Barcode/Plugin“.

Now, when you print the Invoice PDF, the barcode will be shown on the top of the PDF. Happy coding. 🙂

Fill the below form if you have any Magento programming need.





    Recent Articles

    Author Info

    Author Image

    Hire A. Patel

    Get a Free Quote





      /* second popup */

      Connect With Us