Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- window.open("indexpdf.php");
- }
- </script>
- <?php
- $this->Rect(1,1,213,31);
- $this->Rect(1,31,213,1,'DF');
- //Logo
- // $this->Image('../css/images/Logog.jpg',13,2,25,27);
- //Arial bold 15
- $this->SetFont('Arial','B',14);
- //Movernos a la derecha
- $this->Cell(30);
- //Título
- $this->Cell(170,4,'GUIAS DE MENSAJERIA',0,0,'C');
- $this->Ln(2);
- $this->SetFont('Arial','B',10);
- $this->Cell(36);
- $this->MultiCell(170,5,'REPORTE DE GUIA');
- //$this->SetFont('Arial','',6);
- $this->SetFont('Arial','',7);
- $this->Line(1,32,214,32);
- $this->Text(12,36,'SERIE.');
- $this->Text(22,36,'ORDEN'); z
- $this->Text(35,36,'CLIENTE');
- $this->Text(95,36,'CANTIDAD');
- $this->Text(120,36,'FECHA VENCIMIENTO');
- $this->Line(1,38,214,38);
- $this->Line(1,39,214,39);
- //Salto de línea
- $this->Ln(10);
- $this->SetY(45);
- /* $detserie = $row["det.serie"];
- $detorden = $row["det.orden"];
- $cliente = $row["cliente"];
- $cantidad = $row["cantidad"];
- $fechavencimiento = $row["fechavencimiento"];
- */
- }
- //Pie de página
- function Footer()
- {
- //Posición: a 1,5 cm del final
- $this->SetY(-15);
- //Arial italic 8
- $this->SetFont('Arial','I',7);
- //Número de página
- $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');
- $fecha= date("Y-m-d");
- $hora=date("H:i:s");
- $this->Line(1,266,214,266);
- $this->Line(1,273,214,273);
- $fecha= date("Y-m-d");
- $hora=date("H:i:s");
- $this->Text(10,270.5,$fecha);
- $this->Text(30,270.5,$hora);
- $this->Text(148,270.5,$this->f_ini);
- $this->Text(180,270.5,$this->f_fin);
- }
- function __construct()
- {
- //Llama al constructor de su clase Padre.
- //Modificar aka segun la forma del papel del reporte
- parent::__construct('P','mm','Letter');
- }
- //Creación del objeto de la clase heredada
- $pdf=new PDF();
- $pdf->SetTopMargin(5.4);
- $pdf->SetLeftMargin(4.5);
- $pdf->AliasNbPages();
- $pdf->SetFont('Times','',7);
- $cadbusca = "select
- $result=pg_query($cadbusca) or die('La consulta fallo: ' . pg_last_error());
- $pdf->AddPage();
- while($row = pg_fetch_array($result))
- {
- $serie = $row["serie"];
- $orden = $row["orden"];
- $cliente = $row["cliente"];
- $cantidad = $row["cantidad"];
- $fechavencimiento = $row["fechavencimiento"];
- $pdf->Text(13,$pdf->GetY(),$serie);
- $pdf->Text(22,$pdf->GetY(),$orden);
- $pdf->Text(35,$pdf->GetY(),$cliente);
- $pdf->Text(100,$pdf->GetY(),$cantidad);
- $pdf->Text(120,$pdf->GetY(),$fechavencimiento);
- $pdf->cell(0,5.5,'',0,1);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement