Пример #1
0
//$dom = CONFIG('domicilio');
$sucursal = $fila["SUCURSAL_ID"];
//seleccionar nombre del concepto
$sql2 = "select DESCRIPCION, RECEPCION_PARTIDAS_ID from p_recepcion_partidas where RECEPCION_ID = " . $id_recepcion . " order by RECEPCION_PARTIDAS_ID";
// echo $sql2;
$con_res = mysql_query($sql2);
//////////////////////comienza la creación del PDF////////////////////////////////////////////////////////////////////////////
class mipdf extends TCPDF
{
    public function Header()
    {
    }
}
$pdf = new mipdf(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
$pdf->SetKeywords('test');
$pdf->SetFont('helvetica', '', 10);
// set margins
// add a page
$pdf->AddPage();
//en CODIGO DURO EL DOMICILIO DE LA EMPRESA
$encabezado = '<!DOCTYPE html><html>
	<body><table border= "0" width= "500px"  align="center" rules="none">	
			<tr><td align= "left"><img border="0" src="' . CONFIG_ARCHIVOS('logo') . '"></td><td align="right"><p><font color="#c0c0c0" size="12"><font color="#808080">2 Abril #784<br />Col. Independencia<br />Monterrey, Nuevo Le&oacute;n<br />Urgencias : (81)8114-8877<br />Conmutador : (81)8114-8811</font><br /></font></p></td></tr>
		</table>';
//Encabezado
$inicio .= '<br></br><br></br><br></br><br></br>Folio: ' . $folio . '<br></br><br></br>
		   Empresa: ' . $empresa . ' Paciente: ' . $nombre . ' ' . $apellidos . '					' . '--------------------' . ' Fecha: ' . mysql_to_fecha($fecha) . '<br />
		   <br></br> Edad: a' . $edad . ' Sexo: ' . $genero . '<br></br> Médico: ' . $medico;
//seleccionar nombre del concepto
$sql2 = "SELECT DESCRIPCION FROM  p_recepcion_partidas WHERE  RECEPCION_PARTIDAS_ID =" . $id_partida;
$con_res = mysql_query($sql2);
Пример #2
0
        $this->SetXY(7, 7);
        $this->Image('../images/' . CONFIG("EMP_LOGO") . '', '', '', 48, 18, '', '', '', false, 300, '', false, false, 0, false, false, false);
        $this->SetXY(140, 10);
        $this->Image('../images/remisiones/remision_title.jpg', '', '', 60, 20, '', '', '', false, 300, '', false, false, 0, false, false, false);
    }
}
$pdf = new mipdf(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'windows-1252', false);
// 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
$pdf->SetMargins(1, 85, 1);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
//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);
// Agregar pagina
$pdf->AddPage();
//$pdf->Write(0, 'Titulo del Reporte', '', 0, 'L', true, 0, false, false, 0);
$pdf->SetFont('helvetica', '', 8);
//------------------------------------------------------------------------------------------------
//$pdf->SetXY(10, 10);
$tbl = $html_top . $datos . $tbl_head . $tbl_regs . $tbl_inf . $resultados . $html_fondo;
$pdf->writeHTML($tbl, true, false, false, false, '');
$pdf->Output('remision.pdf', 'I');