MUchas gracias amigo, si claro que funciona, por lo general utilizo imagenes jpeg ,en este momento estoy checando lo de los metodos que me comenta
parece ser que si acepta los mismos metodos ya que no marca error y los pone en azul a excepcion de este
MemImage($foto)
asi quedo ahora el codigo
<?
$_SESSION['cont'];
$datos_imagen=$_SESSION["cont"] ;
header("Content-type: image/jpeg" );
$datos_imagen = imagecreatefromjpeg($datos_imagen);
ob_start();
imagejpeg($datos_imagen);
$foto = ob_get_clean();
require_once('eng.php');
require_once('tcpdf.php');
//aca genero un string con los ids separados por comas
// Extend the TCPDF class to create custom Header and Footer
class MYPDF extends TCPDF {
//Page header
public function Header() {
// Logo
$this->Image(K_PATH_IMAGES.'invi.jpg', 145, 7, 25);
// Logo
$this->Image(K_PATH_IMAGES.'Dibujo.jpg', 10, 7, 37);
// Logo
$this->Image(K_PATH_IMAGES.'letr.jpg', 55, 7, 87);
// Set font
$this->SetFont('helvetica', 'B', 7);
// Move to the right
$this->Cell(63);
// Title
$this->Cell(40, 70, '', 100, 30, 8);
//$this->Cell(0, -100, 'Secretaria de Desarrollo Urbano y Vivienda', 135, 5, 10);
// Line break
$this->Ln(20);
}
// Page footer
public function Footer() {
// Position at 1.5 cm from bottom
$this->SetY(-15);
// Set font
$this->SetFont('helvetica', 'I', 8);
// Page number
$this->Cell(0, 10, 'Page '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, 0, 'C');
}
}
// create new PDF document
$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Nicola Asuni');
$pdf->SetTitle('TCPDF Example 003');
$pdf->SetSubject('TCPDF Tutorial');
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
// set default header data
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
// set header and footer fonts
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
//set margins
//set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
//set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
$pdf->setLanguageArray($l);
// ---------------------------------------------------------
// set font
$pdf->SetFont('times', 'BI',10);
// add a page
$pdf->AddPage();
$pdf->SetY(20.2);
$pdf->SetX(75); $pdf->MemImage($foto);
$pdf->Output();
Me marca este error
<b>Fatal error</b>: Call to undefined method MYPDF::MemImage() in <b>D:\AppServ\www\php\Verimagendesdea\finiquitopdf .php</b> on line <b>92</b><br />
gracias y salu2 alguna sugerencia con respecto al metodo que debo usar en lugar de
$pdf->MemImage($foto);
alguna sugerencia respecto al metodo por favor se los agradeceria de antemano
gracias
disculpe amigo caricatos un favor del tamaño del mundo podria ver el codigo fuente de su pdf
en el ejemplo de postales gracias y feliz año nuevo
Última edición por GatorV; 01/01/2010 a las 14:39 |