April 14th, 2009Escribir texto sobre un PDF
Hay que bajar FPDF, FPDI y FPDF_TPL
Después de eso hay que incluir las librerías en un archivo .php y hay que jugar con los métodos.
Ver un ejemplo:
include('tcpdf/tcpdf.php'); include('FPDI/fpdi.php'); class PDF extends FPDI { /** * "Remembers" the template id of the imported page */ var $_tplIdx; /** * include a background template for every page */ function Header() {} function Footer() {} $num = $this->setSourceFile('archivo.pdf'); for ($i=1; $i< =$num; $i++) { $this->AddPage(); $this->_tplIdx = $this->importPage($i); $this->useTemplate($this->_tplIdx); $this->SetMargins(PDF_MARGIN_LEFT, 40, PDF_MARGIN_RIGHT); $this->SetAutoPageBreak(true, 40); $this->setFont("freeserif", "", 12); $this->Write(400, $str); } } } // initiate PDF $pdf = new PDF(); $pdf->escribeEnTodos("Marcos es seco"); $pdf->Output('archivo_out.pdf', 'D');



May 15th, 2009 at 13:52
Pero qué gran tip don Marcos, justo necesitaba escribir sobre un Pdf hoy.
December 23rd, 2009 at 14:12
Muchas gracias, esto es lo que andaba buscando