In the same file the Mage_Sales_Model_Order_Pdf_Abstract::insertOrder method is what draws the header part of the PDF.
To change gray background to white, change:
$page->setFillColor(new Zend_Pdf_Color_GrayScale(0.45));
to
$page->setFillColor(new Zend_Pdf_Color_GrayScale(1));
before the line
$page->drawRectangle(25, $top, 570, $top - 55);
To change color to black in the same file change:
$page->setFillColor(new Zend_Pdf_Color_GrayScale(1));
to
$page->setFillColor(new Zend_Pdf_Color_GrayScale(0));
right after drawRectangle
call.
You will have to do the same in Mage_Sales_Model_Order_Pdf_Abstract::insertDocumentNumber()
because that is where Invoice # is added.
With all of the above said, you are better off with doing local module which overrides the abstract class or the invoice class. And in it just change what you need. This way in case of future changes in the Abstract.php file in core code pool you will inherit new features and retain your changes as well.
You cannot the payment html directly form the order because there is a block involved.
You can generate the html like this:
Let's say $order
is your order object.
$paymentBlock = Mage::helper('payment')->getInfoBlock($order->getPayment())
->setIsSecureMode(true);
$paymentBlock->getMethod()->setStore($order->getStoreId());
$paymentBlockHtml = $paymentBlock->toHtml();
BUt if you want you can attache the payment html to the order object after generating it.
$order->setPaymentHtml($paymentBlockHtml);
and you can read it from the order object after that with
$order->getPaymentHtml();
Best Answer
I solved the problem by adding a new function to Model/Order/Invoice.php:
Then you can use {{var invoice.invoice_date}} to display the formatted date.
Tested with Magento 2.2.3 and EADesign Invoice PDF Generator 1.2.2