0
votes

I'm overriding pdf invoice model to add some text in footer of the pdf.When I print invoice from the backend,strange characters are getting displayed.enter image description here

app/code/local/Company/Invoice/etc/config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Company_Invoice>
            <version>0.1.0</version>
        </Company_Invoice>
    </modules>
    <global>
        <models>
            <sales>
                <rewrite>
                    <order_pdf_invoice>Company_Invoice_Model_Order_Pdf_Invoice</order_pdf_invoice>
                </rewrite>
            </sales>
        </models>
    </global>
</config>

app/code/local/Company/Invoice/Model/Order/Pdf/Invoice.php http://pastebin.com/VQaWr0Xg

If this module is disabled,default Magento prints invoice correctly.Any ideas?

1
have tried adding the encoding? $page->drawText(Mage::helper('sales')->__('test'),25,25, 'UTF-8);Soundz
It doesn't seems to workblakcaps
try passing the page by reference with &$page i got my pdf creation working like thisSoundz

1 Answers

0
votes

It looks like you included a var_dump() statement somewhere. Try searching your codebase for an occurence of var_dump() and remove it.