cancel
Showing results for 
Search instead for 
Did you mean: 

Coloring and formatting of order print

Coloring and formatting of order print

Hi. I'm looking for some help modifying the PDF that is generated when I print an order. I'm talking about the PDF that is generated when I do this: Admin > Orders > Sales > [order] > view > Print.

 

The two problems are:

  1. There is a large gray background box at the top of the PDF; it contains Order # and Order Date. This wastes a bunch of printer ink. I'd like to change the background color to white and font color to black.
  2. My products have a number of customization options. Each option is printed on a new line. The result is several short lines of text on the left side of the print and a load of free white space on the middle/right. This wastes paper. I want to modify the formatting so the customization options are printed horizontally across the page.

Can anyone tell me how to modify the code that generates the print PDF so I can do the fixes above? Thank you. Even just pointing me to the file that needs to be modified would help.

1 REPLY 1

Re: Coloring and formatting of order print

I figured out the file that generates the PDF: /var/www/html/vendor/magento/module-sales/Model/Order/Pdf/Invoice.php

 

After modifying this file, what do I need to do for the changes to take effect?