// Javier: now I use the native constructor // Javier: better to not use references // $PageSize = array(0,0,$Page_Width,$Page_Height); // $pdf = & new Cpdf($PageSize); class Cpdf1 extends Cpdf { public function Footer() { // Position at 15 mm from bottom $this->SetY(-15); //Set font and Page number $this->SetFont($UserPdfFont, 'I', 8); $this->Cell(0, 10, _('Page') . $this->getAliasNumPage() . '/' . $this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M'); } } $pdf = new Cpdf1('L', 'pt', 'LETTER'); $pdf->addInfo('Creator', 'webERP http://www.weberp.org'); $pdf->addInfo('Author', 'webERP ' . $Version); $pdf->addInfo('Title', _('Customer Packing Slip')); $pdf->addInfo('Subject', _('Packing slip for order') . ' ' . $_GET['TransNo']); /* Javier: I have brought this piece from the pdf class constructor to get it closer to the admin/user, I corrected it to match TCPDF, but it still needs check, after which, I think it should be moved to each report to provide flexible Document Header and Margins in a per-report basis. */ $pdf->setAutoPageBreak(0); // Javier: needs check. $pdf->setPrintHeader(false); // Javier: I added this must be called before Add Page $pdf->AddPage(); // $this->SetLineWidth(1); Javier: It was ok for FPDF but now is too gross with TCPDF. TCPDF defaults to 0'57 pt (0'2 mm) which is ok. $pdf->cMargin = 0; // Javier: needs check.