I'm trying to fix this problem by using integration TCPDF in magento but i don't know how do that
this is my try in this file \app\code\core\Mage\Sales\Model\Order\Pdf\Abstract.php
require_once('TCPDF/TCPDF.php');
$pdf = new TCPDF_TCPDF
(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true,'UTF-8', false);
I don't know waht i'm doing wrong. thank you.
1) Don't edit core files.
2) There are multiple invoice generators in magento: invoice from the backend, invoice on success page etc. So make sure that you are editing and testing the right one. The example below works for invoices in the backend.
3) There may be custom modules that are overwriting your xml, like Webshopapps_Invoicing, check that or it will not work (that's the issue that I had when trying something similar).
After you copied TCPDF to your magento lib folder so that you will have now
root/TCPDF/TCPDF.phpedit TCPDF.php by changing the class name fromtcpdftoTCPDF_TCPDFGo into
code/local/Yourcompanyand create the folder invoices. In this folder createetc/config.xmlwith this content:Create another folder structure in
code/local/Yourcompanylike thisSales/Model/Order/Pdfand addInvoice.php:Then submit a test order and go into admin and check a pdf invoice.