From: Rafael C. <raf...@gm...> - 2016-10-01 18:26:37
|
Hello, As way to simplify code and make it more efficient, fast, and readable, we are looking to do not have includes/class.pdf.php and used the native TCPDF functions directly. One step is to Replace addJpegFromFile() [from R&OS pdf.php] with Image() [from tcpdf.php]. Change to be done: // Company Logo: /*$pdf->addJpegFromFile($_SESSION['LogoFile'], $XXX, $YYY, $WWW, $HHH);*/ $pdf->Image( $_SESSION['LogoFile'],// Name of the file containing the image. $XXX,// Abscissa from left border to the upper-left corner (LTR). $Page_Height -($YYY) -($HHH),// Ordinate from top border to the upper-left corner (LTR). $WWW,// Width of the image in the page. If not specified or equal to zero, it is automatically calculated. $HHH,// Height of the image in the page. If not specified or equal to zero, it is automatically calculated. ''// Image format. If not specified, the type is inferred from the file extension. );// Public function Image() in ~/includes/tcpdf/tcpdf.php That change needs to done in 35 files: ~/FixedAssetRegister.php ~/PDFFGLabel.php ~/PDFGLJournalCN.php ~/PDFPrintLabel.php ~/PDFQALabel.php ~/PDFReceipt.php ~/PDFRemittanceAdvice.php ~/PrintCustTrans.php ~/PrintCustTransPortrait.php ~/includes/PDFBankingSummaryPageHeader.inc ~/includes/PDFChequeListingPageHeader.inc ~/includes/PDFCOAHeader.inc ~/includes/PDFCustTransListingPageHeader.inc ~/includes/PDFDeliveryDifferencesPageHeader.inc ~/includes/PDFDIFOTPageHeader.inc ~/includes/PDFGLJournalHeaderCN.inc ~/includes/PDFGLJournalHeader.inc ~/includes/PDFGrnHeader.inc ~/includes/PDFOrderPageHeader_generic.inc ~/includes/PDFOrdersInvoicedPageHeader.inc ~/includes/PDFOrderStatusPageHeader.inc ~/includes/PDFPeriodStockTransListingPageHeader.inc ~/includes/PDFPickingListHeader.inc ~/includes/PDFProdSpecHeader.inc ~/includes/PDFQuotationPageHeader.inc ~/includes/PDFQuotationPortraitPageHeader.inc ~/includes/PDFSalesOrder_generic.inc ~/includes/PDFStatementPageHeader.inc ~/includes/PDFStockTransferHeader.inc ~/includes/PDFSuppTransListingPageHeader.inc ~/includes/PDFTopItemsHeader.inc ~/includes/PDFTransPageHeader.inc ~/includes/PDFTransPageHeaderPortrait.inc ~/includes/PDFWOPageHeader.inc ~/includes/PO_PDFOrderPageHeader.inc I afraid that some of these files are used with customisation. If that is true, please let me know which files are customised, to take the appropriate precautions. Best regards, Rafael. |