Ver Mensaje Individual
  #1 (permalink)  
Antiguo 11/03/2009, 15:33
itham
 
Fecha de Ingreso: marzo-2009
Mensajes: 3
Antigüedad: 15 años, 2 meses
Puntos: 0
Información impresion vertical con la libreria fpdf de php

saludos libres
stoy trasteando el php para ver si hago un programita que imprima cheques tengo este codigo

<?php function viewrec($recid)
{
$res = sql_select();
$count = sql_getrecordcount();
mysql_data_seek($res, $recid);
$row = mysql_fetch_assoc($res);
showrecnav("view", $recid, $count);
$monto=$row["monto"];
$beneficiario=$row["beneficiario"];
$cantidad=$row["cantidad"];
$fecha=$row["fecha"];
$ano=$row["año"];
ob_end_clean();
require('fpdf153/rotation.php');
$pdf=new PDF_Rotate();
$pdf->AddPage();
class PDF extends PDF_Rotate
{
function RotatedText($x, $y, $txt, $angle)
{
//Text rotated around its origin
$this->Rotate($angle, $x, $y);
$this->Text($x, $y, $txt);
$this->Rotate(0);
}
function RotatedImage($file, $x, $y, $w, $h, $angle)
{
//Image rotated around its upper-left corner
$this->Rotate($angle, $x, $y);
$this->Image($file, $x, $y, $w, $h);
$this->Rotate(0);
}
}
//$pdf->Image('imagen/chh.jpg',20,8,178,80,'','');
$pdf->RotatedImage('imagen/chh.jpg', 85, 60, 40, 16, 180);=====linea 492
//$pdf->$this->RotatedImage('imagen/chh.jpg', 85, 60, 40, 16, 180);
$pdf->SetFont('Arial','B',10);
$pdf->ln(1);
$pdf->Cell(105);
$pdf->Cell(100,10,$monto,0,2,'C');
$pdf->SetFont('Arial','B',8);
$pdf->ln(1);
$pdf->Cell(90);
$pdf->Cell(40,10,"Caduca a los 120 Dias",0);
$pdf->SetFont('Arial','B',10);
$pdf->ln(8);
$pdf->Cell(30);
$pdf->Cell(35,10,$beneficiario,0,2,'C');
$pdf->ln(4);
$pdf->Cell(30);
$pdf->Cell(60,-5,$cantidad,0,2,'C');
$pdf->ln(3);
$pdf->Cell(30);
$pdf->Cell(20,25,$fecha,0,2,'C');
$pdf->Cell(125,-25,$ano,0,0,'C');
$pdf->Cell(125,-25,$ano,0,0,'C');
$pdf->ln(3);
$pdf->Cell(130);
$pdf->Cell(45,10,"NO ENDOSABLE",0);
$pdf->Output();
?>
esta casi bien solo que necesito que la impresion de los datos en el cheque salga de forma vertical para imprimir en una impresora de tinta hp y estoy probando la clase rotate.php para ello pero me genera este error:

Fatal error: Call to undefined method PDF_Rotate::RotatedImage() in C:\wamp\www\code\cheque\datos.php on line 492 no entiendo si estoy defieniendo bien el patrron de impresion en $pdf=new PDF_Rotate(); segun rotate.php y de igual manera la funcion function RotatedImage($file, $x, $y, $w, $h, $angle)
de ante mano gracias
saludos libres