Advertisement
Guest User

Untitled

a guest
Dec 3rd, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.67 KB | None | 0 0
  1. window.open("indexpdf.php");
  2.  
  3. }
  4. </script>
  5.  
  6. <?php
  7.  
  8. $this->Rect(1,1,213,31);
  9. $this->Rect(1,31,213,1,'DF');
  10. //Logo
  11. // $this->Image('../css/images/Logog.jpg',13,2,25,27);
  12. //Arial bold 15
  13. $this->SetFont('Arial','B',14);
  14. //Movernos a la derecha
  15. $this->Cell(30);
  16. //Título
  17. $this->Cell(170,4,'GUIAS DE MENSAJERIA',0,0,'C');
  18. $this->Ln(2);
  19. $this->SetFont('Arial','B',10);
  20. $this->Cell(36);
  21. $this->MultiCell(170,5,'REPORTE DE GUIA');
  22. //$this->SetFont('Arial','',6);
  23.  
  24. $this->SetFont('Arial','',7);
  25. $this->Line(1,32,214,32);
  26.  
  27. $this->Text(12,36,'SERIE.');
  28. $this->Text(22,36,'ORDEN'); z
  29. $this->Text(35,36,'CLIENTE');
  30. $this->Text(95,36,'CANTIDAD');
  31. $this->Text(120,36,'FECHA VENCIMIENTO');
  32. $this->Line(1,38,214,38);
  33. $this->Line(1,39,214,39);
  34. //Salto de línea
  35. $this->Ln(10);
  36. $this->SetY(45);
  37.  
  38. /* $detserie = $row["det.serie"];
  39. $detorden = $row["det.orden"];
  40. $cliente = $row["cliente"];
  41. $cantidad = $row["cantidad"];
  42. $fechavencimiento = $row["fechavencimiento"];
  43. */
  44.  
  45. }
  46.  
  47.  
  48. //Pie de página
  49. function Footer()
  50. {
  51.  
  52. //Posición: a 1,5 cm del final
  53. $this->SetY(-15);
  54. //Arial italic 8
  55. $this->SetFont('Arial','I',7);
  56. //Número de página
  57. $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');
  58. $fecha= date("Y-m-d");
  59. $hora=date("H:i:s");
  60. $this->Line(1,266,214,266);
  61. $this->Line(1,273,214,273);
  62. $fecha= date("Y-m-d");
  63. $hora=date("H:i:s");
  64. $this->Text(10,270.5,$fecha);
  65. $this->Text(30,270.5,$hora);
  66. $this->Text(148,270.5,$this->f_ini);
  67. $this->Text(180,270.5,$this->f_fin);
  68. }
  69.  
  70. function __construct()
  71. {
  72. //Llama al constructor de su clase Padre.
  73. //Modificar aka segun la forma del papel del reporte
  74. parent::__construct('P','mm','Letter');
  75. }
  76.  
  77. //Creación del objeto de la clase heredada
  78. $pdf=new PDF();
  79. $pdf->SetTopMargin(5.4);
  80. $pdf->SetLeftMargin(4.5);
  81. $pdf->AliasNbPages();
  82. $pdf->SetFont('Times','',7);
  83.  
  84. $cadbusca = "select
  85.  
  86. $result=pg_query($cadbusca) or die('La consulta fallo: ' . pg_last_error());
  87.  
  88.  
  89. $pdf->AddPage();
  90.  
  91. while($row = pg_fetch_array($result))
  92. {
  93. $serie = $row["serie"];
  94. $orden = $row["orden"];
  95. $cliente = $row["cliente"];
  96. $cantidad = $row["cantidad"];
  97. $fechavencimiento = $row["fechavencimiento"];
  98.  
  99.  
  100. $pdf->Text(13,$pdf->GetY(),$serie);
  101. $pdf->Text(22,$pdf->GetY(),$orden);
  102. $pdf->Text(35,$pdf->GetY(),$cliente);
  103. $pdf->Text(100,$pdf->GetY(),$cantidad);
  104. $pdf->Text(120,$pdf->GetY(),$fechavencimiento);
  105. $pdf->cell(0,5.5,'',0,1);
  106.  
  107. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement