本文整理汇总了PHP中TCPDF::setPageOrientation方法的典型用法代码示例。如果您正苦于以下问题:PHP TCPDF::setPageOrientation方法的具体用法?PHP TCPDF::setPageOrientation怎么用?PHP TCPDF::setPageOrientation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TCPDF
的用法示例。
在下文中一共展示了TCPDF::setPageOrientation方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setPageOrientation
/**
* setPageOrientation - set page orientation
*
* @param Response $response \Xoops\Core\Service\Response object
* @param string $pageOrientation page orientation, 'P' for portrait, 'L' for landscape
*
* @return void
*/
public function setPageOrientation($response, $pageOrientation)
{
$this->pageOrientation = $pageOrientation;
if (isset($this->pdfEngine)) {
$this->pdfEngine->setPageOrientation($this->pageOrientation, true, $this->bottomMargin);
}
}
示例2: setPageOrientation
/**
* {@inheritdoc}
*/
public function setPageOrientation($orientation = PdfGeneratorInterface::PORTRAIT)
{
if ($orientation == 'portrait') {
$orientation = 'P';
} else {
$orientation = 'L';
}
$this->generator->setPageOrientation($orientation);
}
示例3: stripslashes
$pdf->SetFont('dejavusanscondensed', '', 8);
// params
$recipient = stripslashes($_POST['recipient']);
$inn = stripslashes($_POST['inn']);
$account = stripslashes($_POST['account']);
$bank = stripslashes($_POST['bank']);
$bik = stripslashes($_POST['bik']);
$correspondent_account = stripslashes($_POST['correspondent_account']);
$banknote = stripslashes($_POST['banknote']);
$pence = stripslashes($_POST['pence']);
$order_id = stripslashes($_POST['order_id']);
$amount = stripslashes($_POST['amount']);
//set document properties
$pdf->setPrintHeader(false);
$pdf->setPrintFooter(false);
$pdf->setPageOrientation('P');
//set font for the entire document
$pdf->SetTextColor(0, 0, 0);
//set up a page
$pdf->AddPage();
$pdf->SetDisplayMode('real');
$pdf->SetFontSize(8);
// ширина квитанции
$width = 190;
// Высота половинки
$height = 75;
// ширина слушебного поля
$field_width = 80;
// Начальные координаты
$x = 10;
$y = 10;
示例4: showPdf
function showPdf($idReg = "")
{
global $db;
// Oficina
$sesIdOficina = $_SESSION[sesIdOficina];
$oficina = getValueTable("oficina", "OFICINA", "id_oficina", $sesIdOficina);
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, 'LETTER', false, 'ISO-8859-1', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Nicola Asuni');
$pdf->SetTitle('TCPDF Example 009');
$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.' 009', 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
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
//$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
// $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// $pdf->SetFooterMargin(3);
$pdf->setPageOrientation('P', '', 1);
//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 some language dependent data:
$lg = array();
$lg['a_meta_charset'] = 'ISO-8859-1';
$lg['a_meta_dir'] = 'ltr';
$lg['a_meta_language'] = 'en';
$lg['w_page'] = 'page';
//set some language-dependent strings
$pdf->setLanguageArray($lg);
// -------------------------------
// CONSULTA DE DATOS
// -------------------------------
$sql = "select * from INVENTARIO where id_inventario='{$idReg}'";
$db->query($sql);
while ($db->next_record()) {
$entSal = $db->f('ent_sal');
$eir = $db->f(eir);
//$idCliente = $db->f('id_cliente');
//$cliente = getValueTable("cliente","CLIENTE","id_cliente",$idCliente);
$cliente = $db->f('consig');
$idConte = $db->f('id_contenedor');
$conte = getValueTable("numero", "CONTENEDOR", "id_contenedor", $idConte);
if (preg_match("/(\\w{4})(\\d{7})/", $conte, $parts)) {
$conteL = $parts[1];
$conteN = $parts[2];
}
$idEq = getValueTable("id_equipo", "CONTENEDOR", "id_contenedor", $idConte);
$equipo = getValueTable("equipo", "EQUIPO", "id_equipo", $idEq);
$bkg = $db->f('bkg');
$clase = $db->f('clase');
$clase = "CLASE: {$clase} ";
$damage = $db->f('damage');
$sello = $db->f('sello');
$nota = $db->f('nota');
//$idTrans = $db->f('id_transporte');
//$transp = getValueTable("transporte","TRANSPORTE","id_transporte",$idTrans);
$transp = $db->f('transportista');
$conteP1 = substr($conte, 0, 4);
$conteP2 = substr($conte, 4, 10);
if (preg_match("/(\\d+)(\\d)\$/", $conteP2, $parts)) {
$conteP2 = $parts[1] . "-" . $parts[2];
}
$idNav = $db->f('id_naviera');
$naviera = getValueTable("naviera", "NAVIERA", "id_naviera", $idNav);
$placas = $db->f('placas');
// $idOperador = $db->f('id_operador');
//$operador = getValueTable("operador","OPERADOR","id_operador",$idOperador);
$operador = $db->f('operador');
$capFec = $db->f('cap_fec');
if ($entSal == "E") {
$entSalTx = "INVENTARIO";
}
if ($entSal == "S") {
$entSalTx = "SALIDA";
}
$tipoMani = $db->f('tipo_mani');
$noRecibo = $db->f('recibo');
if ($tipoMani == "D") {
$tipoManiTx = "MANIOBRA DE DESCARGA";
}
if ($tipoMani == "C") {
$tipoManiTx = "MANIOBRA DE CARGA";
}
$maniCosto = $db->f('mani_costo');
$montoLetra = traducirCifra($maniCosto);
$capIdUsr = $db->f('cap_id_usr');
$capFec = $db->f('cap_fec');
$capUsr = getValueTable("usuario", "USUARIO", "id_usuario", $capIdUsr);
//.........这里部分代码省略.........
示例5: showPdf
function showPdf($idReg = "")
{
global $db;
// Oficina
//$sesIdOficina = $_SESSION[sesIdOficina];
//$oficina = getValueTable("oficina","OFICINA","id_oficina",$sesIdOficina);
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, 'LETTER', false, 'ISO-8859-1', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Nicola Asuni');
$pdf->SetTitle('TCPDF Example 009');
$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.' 009', 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
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
//$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
// $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// $pdf->SetFooterMargin(3);
$pdf->setPageOrientation('P', '', 1);
//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 some language dependent data:
$lg = array();
$lg['a_meta_charset'] = 'ISO-8859-1';
$lg['a_meta_dir'] = 'ltr';
$lg['a_meta_language'] = 'es';
$lg['w_page'] = 'page';
//set some language-dependent strings
$pdf->setLanguageArray($lg);
// -------------------------------
// CONSULTA DE DATOS
// -------------------------------
$sql = "select * from SALIDA where id_salida='{$idReg}'";
$db->query($sql);
while ($db->next_record()) {
$docu = $db->f(doc_tipo);
$docuRef = $db->f(doc_ref);
$docTipo = $db->f(doc_tipo);
//$entSal= $db->f('ent_sal');
$idSal = $idReg;
$eir = $db->f(eir);
$idOficina = $db->f(id_oficina);
//$idCliente = $db->f('id_cliente');
//$cliente = getValueTable("cliente","CLIENTE","id_cliente",$idCliente);
$cliente = $db->f('consig');
$idConte = $db->f('id_contenedor');
$conte = getValueTable("numero", "CONTENEDOR", "id_contenedor", $idConte);
if (preg_match("/(\\w{4})(\\d{7})/", $conte, $parts)) {
$conteL = $parts[1];
$conteN = $parts[2];
}
$maniStPago = $db->f(mani_st_pago);
if ($maniStPago == "M") {
$pagaManiobras = "MERCHANT";
} elseif ($maniStPago == "C") {
$pagaManiobras = "CARRIER";
}
$idEq = getValueTable("id_equipo", "CONTENEDOR", "id_contenedor", $idConte);
$equipo = getValueTable("equipo", "EQUIPO", "id_equipo", $idEq);
$bkg = $db->f('bkg');
$clase = $db->f('clase');
$clase = "CLASE: {$clase} ";
$damage = $db->f('damage');
$sello = $db->f('sello');
$nota = $db->f('nota');
//$idTrans = $db->f('id_transporte');
//$transp = getValueTable("transporte","TRANSPORTE","id_transporte",$idTrans);
$transp = $db->f('transportista');
$conteP1 = substr($conte, 0, 4);
$conteP2 = substr($conte, 4, 10);
if (preg_match("/(\\d+)(\\d)\$/", $conteP2, $parts)) {
$conteP2 = $parts[1] . "-" . $parts[2];
}
$idNav = $db->f('id_naviera');
$naviera = getValueTable("naviera", "NAVIERA", "id_naviera", $idNav);
$placas = $db->f('placas');
// $idOperador = $db->f('id_operador');
//$operador = getValueTable("operador","OPERADOR","id_operador",$idOperador);
$operador = $db->f('operador');
$capFec = $db->f('cap_fec');
$entSalTx = "SALIDA";
$tipoMani = $db->f('tipo_mani');
$noRecibo = $db->f('recibo');
if ($tipoMani == "D") {
$tipoManiTx = "MANIOBRA DE DESCARGA";
}
if ($tipoMani == "C") {
$tipoManiTx = "MANIOBRA DE CARGA";
//.........这里部分代码省略.........
示例6: showPdf
function showPdf($idReg = "")
{
global $db;
// -------------------------------
// CONSULTA DE DATOS
// -------------------------------
$sql = "select * from ENTRADA where id_entrada='{$idReg}'";
$db->query($sql);
while ($db->next_record()) {
$entSal = $db->f('ent_sal');
//$idCliente = $db->f('id_cliente');
//$cliente = getValueTable("cliente","CLIENTE","id_cliente",$idCliente);
$cliente = $db->f('consig');
$idConte = $db->f('id_contenedor');
$conte = getValueTable("numero", "CONTENEDOR", "id_contenedor", $idConte);
if (preg_match("/(\\w{4})(\\d{7})/", $conte, $parts)) {
$conteL = $parts[1];
$conteN = $parts[2];
}
$idEq = getValueTable("id_equipo", "CONTENEDOR", "id_contenedor", $idConte);
$equipo = getValueTable("equipo", "EQUIPO", "id_equipo", $idEq);
$bkg = $db->f('bkg');
$clase = $db->f('clase');
$damage = $db->f('damage');
$sello = $db->f('sello');
$nota = $db->f('nota');
//$idTrans = $db->f('id_transporte');
//$transp = getValueTable("transporte","TRANSPORTE","id_transporte",$idTrans);
$transp = $db->f('transportista');
$conteP1 = substr($conte, 0, 4);
$conteP2 = substr($conte, 4, 10);
if (preg_match("/(\\d+)(\\d)\$/", $conteP2, $parts)) {
$conteP2 = $parts[1] . "-" . $parts[2];
}
$idNav = $db->f('id_naviera');
$naviera = getValueTable("naviera", "NAVIERA", "id_naviera", $idNav);
$placas = $db->f('placas');
// $idOperador = $db->f('id_operador');
//$operador = getValueTable("operador","OPERADOR","id_operador",$idOperador);
$operador = $db->f('operador');
if ($entSal == "E") {
$entCapFec = $db->f('cap_fec');
$entTrans = $transp;
$entOpera = $operador;
$entPlacas = $placas;
$entClase = "CLASE : {$clase}";
$entDamage = $damage;
$entSello = $sello;
$entNota = $nota;
}
if ($entSal == "S") {
$salCapFec = $db->f('cap_fec');
$salTrans = $transp;
$salOpera = $operador;
$salPlacas = $placas;
$salClase = "CLASE : {$clase}";
$salDamage = $damage;
$salSello = $sello;
$salNota = $nota;
}
}
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, 'LETTER', true, 'ISO-8859-1', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Nicola Asuni');
$pdf->SetTitle('TCPDF Example 009');
$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.' 009', 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
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
//$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
// $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// $pdf->SetFooterMargin(3);
$pdf->setPageOrientation('P', '', 1);
//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);
// -------------------------------------------------------------------
$pdf->AddPage();
// Logo
$pdf->setJPEGQuality(100);
$pdf->Image('../images/logo_color.jpg', 13, 4, 25, 25, '', '', '', false);
$pdf->Image('../images/nome.jpg', 15, 140, 185, 96, '', '', '', false);
// set cell padding
//$pdf->setCellPaddings(1, 1, 1, 1);
// set cell margins
//$pdf->setCellMargins(1, 1, 1, 1);
$pdf->SetFillColor(197, 197, 197);
// set font
//.........这里部分代码省略.........
示例7: showPdf
function showPdf($idReg = "")
{
global $db;
// Oficina
$sesIdOficina = $_SESSION[sesIdOficina];
$oficina = getValueTable("oficina", "OFICINA", "id_oficina", $sesIdOficina);
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, 'LETTER', false, 'ISO-8859-1', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Nicola Asuni');
$pdf->SetTitle('TCPDF Example 009');
$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.' 009', 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
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
//$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
// $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// $pdf->SetFooterMargin(3);
$pdf->setPageOrientation('P', '', 1);
//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 some language dependent data:
$lg = array();
$lg['a_meta_charset'] = 'ISO-8859-1';
$lg['a_meta_dir'] = 'ltr';
$lg['a_meta_language'] = 'en';
$lg['w_page'] = 'page';
//set some language-dependent strings
$pdf->setLanguageArray($lg);
// -------------------------------
// CONSULTA DE DATOS
// -------------------------------
$sql = "select * from PENSION where id_pension='{$idReg}'";
$db->query($sql);
while ($db->next_record()) {
$noRecibo = $db->f(id_pension);
$entFec = $db->f(ent_fec);
$salFec = $db->f(sal_fec);
$idConte = $db->f(id_contenedor);
$conte = getValueTable("numero", "CONTENEDOR", "id_contenedor", $idConte);
$idEq = getValueTable("id_equipo", "CONTENEDOR", "id_contenedor", $idConte);
$equipo = getValueTable("equipo", "EQUIPO", "id_equipo", $idEq);
$concepto = $db->f(concepto);
$operador = $db->f(operador);
$placas = $db->f(placas);
$monto = $db->f(monto);
$montoLetra = traducirCifra($monto);
$idOficina = $db->f(id_oficina);
$transporte = $db->f(transporte);
$metPago = $db->f(met_pago);
}
// ---------------------------------------------------------
// DATOS DEL RECIBO
// ---------------------------------------------------------
$datoRecibo = "\n\n <table cellspacing=\"0\" cellpadding=\"3\" border=\"1\" align=\"center\"> \n <tr>\n <td colspan=\"4\" valign=\"middle\"><b>DEPOSITO DE CONTENEDORES TMA</b></td>\n <td>\n <table cellspacing=\"1\" cellpadding=\"2\" border=\"0\" align=\"center\"> \n <tr>\n <td bgcolor=\"black\"><b><font color=\"white\">FOLIO</font></b></td>\n </tr>\n <tr>\n <td><font color=\"red\"><b>No. {$noRecibo}</b></font></td>\n </tr>\n </table>\n </td>\n </tr> \n <tr>\n <td><b>ENTRADA</b></td>\n <td><b>SALIDA</b></td> \n <td><b>TRANSPORTE</b></td>\n <td><b>CONTENEDOR</b></td>\n <td><b>TIPO</b></td>\n </tr>\n <tr>\n <td>{$entFec}</td> \n <td>{$salFec}</td>\n <td>{$transporte}</td>\n <td>{$conte}</td>\n <td>{$equipo}</td>\n </tr> \n <tr> \n <td colspan=\"2\"><b>OPERADOR</b></td> \n <td><b>PLACAS</b></td> \n <td colspan=\"2\"><b>OBSERVACIONES</b></td> \n </tr> \n <tr> \n <td colspan=\"2\">{$operador}</td>\n <td>{$placas}</td> \n <td colspan=\"2\">{$nota}</td> \n </tr>\n </table>\n <table cellspacing=\"0\" cellpadding=\"3\" border=\"1\" align=\"center\">\n <tr>\n <td ><b>FIRMA OPERADOR</b></td>\n <td ><b>FIRMA DEL DEPOSITO</b></td>\n <td>\n <table cellspacing=\"0\" cellpadding=\"3\" border=\"1\" align=\"center\">\n <tr>\n <td align=\"right\"><b>{$concepto} \$</b></td>\n <td align=\"right\">{$monto}</td>\n </tr> \n <tr>\n <td align=\"right\"><b>SUBTOTAL \$</b></td>\n <td align=\"right\">{$monto}</td>\n </tr> \n <tr>\n <td align=\"right\"><b>TOTAL \$</b></td>\n <td align=\"right\">{$monto}</td>\n </tr> \n </table>\n </td>\n </tr>\n <tr>\n <td colspan=\"3\" align=\"center\">\n RECIBIMOS DE <u>{$operador}</u> LA CANTIDAD DE {$montoLetra} PESOS M.N. 00/100<br> \n <b>Metodo de pago :</b> {$metPago}<br>\n ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>\n EMISION DE FACTURA DENTRO DE LOS 5 DIAS POSTERIORES A LA REALIZACIÓN DE SU SERVICIO<br>\n PASADO ESTE TIEMPO NO HABRÁ EMISIÓN DE FACTURAS.<br>\n Solicitarla al correo: facturacionpatios@demo.com.mx<br>\n </td>\n </tr>\n </table> \n\n <br><br><br><br><br><br>\n <center>---------------------------------- RECIBO PARA VIGILANCIA ---------------------------------- </center> \n <br><br><br><br><br>\n\n <table cellspacing=\"0\" cellpadding=\"3\" border=\"1\" align=\"center\"> \n <tr>\n <td colspan=\"4\" valign=\"middle\"><b>DEPOSITO DE CONTENEDORES</b></td>\n <td>\n <table cellspacing=\"1\" cellpadding=\"2\" border=\"0\" align=\"center\"> \n <tr>\n <td bgcolor=\"black\"><b><font color=\"white\">FOLIO</font></b></td>\n </tr>\n <tr>\n <td><font color=\"red\"><b>No. {$noRecibo}</b></font></td>\n </tr>\n </table>\n </td>\n </tr> \n <tr>\n <td><b>ENTRADA</b></td>\n <td><b>SALIDA</b></td> \n <td><b>TRANSPORTE</b></td>\n <td><b>CONTENEDOR</b></td>\n <td><b>TIPO</b></td>\n </tr>\n <tr>\n <td>{$entFec}</td> \n <td>{$salFec}</td>\n <td>{$transporte}</td>\n <td>{$conte}</td>\n <td>{$equipo}</td>\n </tr> \n <tr> \n <td colspan=\"2\"><b>OPERADOR</b></td> \n <td><b>PLACAS</b></td> \n <td colspan=\"2\"><b>OBSERVACIONES</b></td> \n </tr> \n <tr> \n <td colspan=\"2\">{$operador}</td>\n <td>{$placas}</td> \n <td colspan=\"2\">{$nota}</td> \n </tr>\n </table>\n <table cellspacing=\"0\" cellpadding=\"3\" border=\"1\" align=\"center\">\n <tr>\n <td ><b>FIRMA OPERADOR</b></td>\n <td ><b>FIRMA DEL DEPOSITO</b></td>\n <td>\n <table cellspacing=\"0\" cellpadding=\"3\" border=\"1\" align=\"center\">\n <tr>\n <td align=\"right\"><b>{$concepto} \$</b></td>\n <td align=\"right\">{$monto}</td>\n </tr> \n <tr>\n <td align=\"right\"><b>SUBTOTAL \$</b></td>\n <td align=\"right\">{$monto}</td>\n </tr> \n <tr>\n <td align=\"right\"><b>TOTAL \$</b></td>\n <td align=\"right\">{$monto}</td>\n </tr> \n </table>\n </td>\n </tr>\n <tr>\n <td colspan=\"3\" align=\"center\">\n RECIBIMOS DE <u>{$operador}</u> LA CANTIDAD DE {$montoLetra} PESOS M.N. 00/100 <br>\n <b>Metodo de pago :</b> {$metPago}<br>\n ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>\n EMISION DE FACTURA DENTRO DE LOS 5 DIAS POSTERIORES A LA REALIZACIÓN DE SU SERVICIO<br>\n PASADO ESTE TIEMPO NO HABRÁ EMISIÓN DE FACTURAS.<br>\n Solicitarla al correo: facturacionpatios@demo.com.mx<br>\n </td>\n </tr>\n </table> \n\n ";
// -------------------------------------------------------------------
$pdf->AddPage();
// Logo
$pdf->setJPEGQuality(100);
$pdf->Image('../images/logo_color.jpg', 13, 4, 25, 25, '', '', '', false);
//$pdf->Image('../images/nome.jpg', 15, 140, 185, 96,'','','',false);
// set cell padding
//$pdf->setCellPaddings(1, 1, 1, 1);
// set cell margins
//$pdf->setCellMargins(1, 1, 1, 1);
// Encabezado
$pdf->SetFillColor(197, 197, 197);
if ($idOficina == 1) {
$txt = "ALMARTCON S.A. DE C.V.\n\"El Trébol\"";
$pdf->SetFont('helvetica', '', 14);
$pdf->MultiCell(65, 4, $txt, 0, 'L', 0, 0, 40, 10, true);
$txt = "Direccion, Guatemala \\Tel. 505-2350-0976 Cel. 505-8635-0708";
$pdf->SetFont('helvetica', '', 7);
$pdf->MultiCell(60, 4, $txt, 0, 'C', 0, 0, 105, 10, true);
}
/* elseif( $idOficina==2 ){
$txt = "ALMARTCON S.A DE C.V.\n\"El Arbol\"";
$pdf->SetFont('helvetica', '', 14);
$pdf->MultiCell(65, 4,$txt, 0, 'L',0, 0, 40, 10,true);
$txt="Av. Refinería Azcapotzalco S/N \nEsq. Ferrocarriles Nacionales.\nMéxico D.F.";
$pdf->SetFont('helvetica', '', 7);
$pdf->MultiCell(60, 4,$txt, 0, 'C',0, 0, 105, 10,true);
}
elseif( $idOficina==3 ){
$txt = "TRANSPORTES MALEJA S.A DE C.V.\n\"El Pino\"";
$pdf->SetFont('helvetica', '', 14);
$pdf->MultiCell(65, 4,$txt, 0, 'L',0, 0, 40, 10,true);
$txt="Carretera Querétaro San Luis Potosí Km.28\nCol.Buenavista Santa Rosa Jauregui\nQueretaro, QRO.";
//.........这里部分代码省略.........
示例8: TCPDF
<?php
//require_once("../tcpdf/tcpdf.php");
//require_once("../omrlib.php");
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Blended Module');
$pdf->SetTitle('TCPDF Example 027');
$pdf->SetSubject('TCPDF Tutorial');
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
$pdf->setPageOrientation('PORTRAIT', false, $margins['bottom']);
$margins = $pdf->getMargins();
//JPC: temporaly gets default margins. Later margins comes with the request
//set margins
$pdf->SetMargins($margins['left'], $margins['top'], $margins['right']);
$pdf->SetHeaderMargin(0);
//PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(0);
//PDF_MARGIN_FOOTER);
$margins = $pdf->getMargins();
//set auto page breaks
$pdf->SetAutoPageBreak(FALSE, $margins['bottom']);
//set image scale factor
$pdf->setImageScale(8);
// set font
$pdf->SetFont('courier', '', 6);
$style = array('position' => 'S', 'border' => false, 'padding' => 1, 'fgcolor' => array(0, 0, 0), 'bgcolor' => false, 'text' => true, 'font' => 'courier', 'fontsize' => 8, 'stretchtext' => 4);
$question = new stdClass();
$question->id = "Q1";
示例9: setPageOrientation
/**
* Set page orientation
*
* @param string $orientation page orientation
* @param string $autopagebreak see TCPDF docs
* @param string $bottommargin see TCPDF docs
*
* @author Adam Zammit <adam.zammit@acspri.org.au>
* @since 2015-06-19
*/
public function setPageOrientation($orientation, $autopagebreak = '', $bottommargin = '')
{
parent::setPageOrientation($orientation, $autopagebreak, $bottommargin);
}
示例10: TCPDF
<?php
require_once(dirname(__FILE__) . '/../../config.php');
global $CFG;
global $DB;
require_once("$CFG->libdir/pdflib.php");
require_once ("../../local/request/lib/lib.php");
require_once('../../message/lib.php');
$id = optional_param('id', 0, PARAM_INT);
$semid = optional_param('semid', 0, PARAM_INT);
$doc = new TCPDF(null, 'cm', 'A4', true, 'UTF-8', false);
$doc->setPrintHeader(false);
$doc->setPrintFooter(false);
$doc->Addpage();
$doc->setPageOrientation($orientation = 'P', $unit = 'cm', $format = 'A4', $unicode = true, $encoding = 'UTF-8', $diskcache = false, $pdfa = false);
$request = new requests();
if ($semid) {
$studentid = $DB->get_field('local_request_transcript', 'studentid', array('id' => $id));
$DB->set_field('local_request_transcript', 'reg_approval', 1, array('id' => $id, 'req_semester' => $semid));
$DB->set_field('local_request_transcript', 'regapproval_date', time(), array('id' => $id, 'req_semester' => $semid));
$userto = $DB->get_record('user', array('id' => $studentid));
$userfrom = $DB->get_record('user', array('id' => $USER->id));
$message = get_string('transcriptapproved', 'local_request');
$message_post_message = message_post_message($userfrom, $userto, $message, FORMAT_HTML);
}
$record = $DB->get_records('local_user_classgrades', array('semesterid' => $semid, 'userid' => $studentid));
$table = "<table style='width:75%;margin:auto' cellpadding=\"5\" border = \"1px\">
<tr><th style=\"text-align:center;\" width=\"40%\"><b>" . get_string("class", "local_clclasses") . "</b></th><th style=\"text-align:center\" width=\"20%\"><b>" . get_string("finalgrade", "local_gradesubmission") . "</b></th><th style=\"text-align:center\" width=\"20%\"><b>" . get_string("wgp", "local_request") . "</b></th><th style=\"text-align:center\" width=\"20%\"><b>" . get_string("credit", "local_request") . "</b></th></tr>";
$gpa = 0;