本文整理汇总了PHP中Cezpdf::ezSetY方法的典型用法代码示例。如果您正苦于以下问题:PHP Cezpdf::ezSetY方法的具体用法?PHP Cezpdf::ezSetY怎么用?PHP Cezpdf::ezSetY使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cezpdf
的用法示例。
在下文中一共展示了Cezpdf::ezSetY方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: upload_file_to_client_pdf
function upload_file_to_client_pdf($file_to_send)
{
//Function reads a text file and converts to pdf.
global $STMT_TEMP_FILE_PDF;
$pdf = new Cezpdf('LETTER');
//pdf creation starts
$pdf->ezSetMargins(36, 0, 36, 0);
$pdf->selectFont($GLOBALS['fileroot'] . "/library/fonts/Courier.afm");
$pdf->ezSetY($pdf->ez['pageHeight'] - $pdf->ez['topMargin']);
$countline = 1;
$file = fopen($file_to_send, "r");
//this file contains the text to be converted to pdf.
while (!feof($file)) {
$OneLine = fgets($file);
//one line is read
if (stristr($OneLine, "\f") == true && !feof($file)) {
$pdf->ezNewPage();
$pdf->ezSetY($pdf->ez['pageHeight'] - $pdf->ez['topMargin']);
str_replace("\f", "", $OneLine);
}
if (stristr($OneLine, 'REMIT TO') == true || stristr($OneLine, 'Visit Date') == true) {
//lines are made bold when 'REMIT TO' or 'Visit Date' is there.
$pdf->ezText('<b>' . $OneLine . '</b>', 12, array('justification' => 'left', 'leading' => 6));
} else {
$pdf->ezText($OneLine, 12, array('justification' => 'left', 'leading' => 6));
}
$countline++;
}
$fh = @fopen($STMT_TEMP_FILE_PDF, 'w');
//stored to a pdf file
if ($fh) {
fwrite($fh, $pdf->ezOutput());
fclose($fh);
}
header("Pragma: public");
//this section outputs the pdf file to browser
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/force-download");
header("Content-Length: " . filesize($STMT_TEMP_FILE_PDF));
header("Content-Disposition: attachment; filename=" . basename($STMT_TEMP_FILE_PDF));
header("Content-Description: File Transfer");
readfile($STMT_TEMP_FILE_PDF);
// flush the content to the browser. If you don't do this, the text from the subsequent
// output from this script will be in the file instead of sent to the browser.
flush();
exit;
//added to exit from process properly in order to stop bad html code -ehrlive
// sleep one second to ensure there's no follow-on.
sleep(1);
}
示例2: bukti
public function bukti($a)
{
$pdfku = new Cezpdf("A5", 'landscape');
//595.28,841.29
$pdfku->addInfo('Title', 'List Barang');
$pdfku->ezSetCmMargins("3", "3", "3", "3");
$barang = $this->barang->detail_peminjaman($a);
$pdfku->ezSetY(100);
$pdfku->ezSetDy(230);
//$pdfku->addJpegFromFile("icon.jpg",20,300,-1);
$pdfku->addText(120, $pdfku->y + 30, 18, "Bukti Peminjaman Inventaris Laboratorium");
$pdfku->addText(160, $pdfku->y + 10, 15, "Komputasi Berbasis Jaringan (KBJ)");
$cols_db = array('id_barang' => 'ID Barang', 'nama_barang' => 'Nama Barang');
$option_db = array('showHeadings' => 2, 'shaded' => 0, 'xPos' => 'center', 'xOrientation' => 'center', 'fontSize' => 12, 'cols' => array('id_barang' => array('justification' => 'center', 'width' => '120'), 'nama_barang' => array('justification' => 'center', 'width' => '120')));
$pdfku->ezTable($barang, $cols_db, '', $option_db);
$pdfku->addText(100, $pdfku->y - 40, 12, "Mengetahui ");
$pdfku->addText(90, $pdfku->y - 60, 12, "Administrator Lab");
$pdfku->addText(400, $pdfku->y - 60, 12, "Kepala Laboratorium");
$pdfku->addText(80, $pdfku->y - 130, 10, "__________________");
$pdfku->addText(400, $pdfku->y - 130, 10, "__________________");
$pdfku->ezStream();
}
示例3: imprimirEstadoCuentaCliente
/**
* Crea un pdf con el estado de cuenta de el cliente especificado
* @param Array $args, $args['id_cliente'=>12[,'tipo_venta'=> 'credito | contado | saldo'] ], por default obtiene todas las compras del cliente
*/
public static function imprimirEstadoCuentaCliente($args)
{
//verificamos que se haya especificado el id del cliente
if (!isset($args['id_cliente'])) {
Logger::log("Error al obtener el estado de cuenta, no se ha especificado un cliente.");
die('{"success": false, "reason": "Error al obtener el estado de cuenta, no se ha especificado un cliente."}');
}
//verificamos que el cliente exista
if (!($cliente = ClienteDAO::getByPK($args['id_cliente']))) {
Logger::log("Error al obtener el estado de cuenta, no se tiene registro del cliente {$args['id_cliente']}.");
die('{"success": false, "reason": "Error al obtener el estado de cuenta, no se tiene registro del cliente ' . $args['id_cliente'] . '"}');
}
//obtenemos los datos del emisor
$estado_cuenta = estadoCuentaCliente($args);
//buscar los datos del emisor
if (!($emisor = PosConfigDAO::getByPK('emisor'))) {
Logger::log("no encuentro los datos del emisor");
die("no encuentro los datos del emisor");
}
$emisor = json_decode($emisor->getValue())->emisor;
$sucursal = SucursalDAO::getByPK($_SESSION['sucursal']);
if (!$sucursal) {
die("Sucursal invalida");
}
include_once 'librerias/ezpdf/class.pdf.php';
include_once 'librerias/ezpdf/class.ezpdf.php';
$pdf = new Cezpdf();
$pdf->selectFont('../server/librerias/ezpdf/fonts/Helvetica.afm');
//margenes de un centimetro para toda la pagina
$pdf->ezSetMargins(1, 1, 1, 1);
/*
* LOGO
*/
if (!($logo = PosConfigDAO::getByPK('url_logo'))) {
Logger::log("Verifique la configuracion del pos_config, no se encontro el camṕo 'url_logo'");
die("Verifique la configuracion del POS, no se encontro el url del logo");
}
//addJpegFromFile(imgFileName,x,y,w,[h])
//detectamos el tipo de imagen del logo
if (substr($logo->getValue(), -3) == "jpg" || substr($logo->getValue(), -3) == "JPG" || substr($logo->getValue(), -4) == "jpeg" || substr($logo->getValue(), -4) == "JPEG") {
$pdf->addJpegFromFile($logo->getValue(), puntos_cm(2), puntos_cm(25.5), puntos_cm(3.5));
} elseif (substr($logo->getValue(), -3) == "png" || substr($logo->getValue(), -3) == "PNG") {
$pdf->addPngFromFile($logo->getValue(), puntos_cm(2), puntos_cm(25.5), puntos_cm(3.5));
} else {
Logger::log("Verifique la configuracion del pos_config, la extension de la imagen del logo no es compatible");
die("La extension de la imagen usada para el logo del negocio no es valida.");
}
/* * ************************
* ENCABEZADO
* ************************* */
$e = "<b>" . self::readableText($emisor->nombre) . "</b>\n";
$e .= formatAddress($emisor);
$e .= "RFC: " . $emisor->rfc . "\n\n";
//datos de la sucursal
$e .= "<b>Lugar de expedicion</b>\n";
$e .= self::readableText($sucursal->getDescripcion()) . "\n";
$e .= formatAddress($sucursal);
$datos = array(array("emisor" => $e));
$pdf->ezSetY(puntos_cm(28.6));
$opciones_tabla = array();
$opciones_tabla['showLines'] = 0;
$opciones_tabla['showHeadings'] = 0;
$opciones_tabla['shaded'] = 0;
$opciones_tabla['fontSize'] = 8;
$opciones_tabla['xOrientation'] = 'right';
$opciones_tabla['xPos'] = puntos_cm(7.3);
$opciones_tabla['width'] = puntos_cm(11);
$opciones_tabla['textCol'] = array(0, 0, 0);
$opciones_tabla['titleFontSize'] = 12;
$opciones_tabla['rowGap'] = 3;
$opciones_tabla['colGap'] = 3;
$pdf->ezTable($datos, "", "", $opciones_tabla);
$cajero = UsuarioDAO::getByPK($_SESSION['userid'])->getNombre();
$datos = array(array("col" => "<b>Cajero</b>"), array("col" => self::readableText($cajero)), array("col" => "<b>Cliente</b>"), array("col" => self::readableText($cliente->getRazonSocial())), array("col" => "<b>Limite de Credito</b>"), array("col" => FormatMoney($estado_cuenta->limite_credito, DONT_USE_HTML)), array("col" => "<b>Saldo</b>"), array("col" => FormatMoney($estado_cuenta->saldo, DONT_USE_HTML)));
$pdf->ezSetY(puntos_cm(28.8));
$opciones_tabla['xPos'] = puntos_cm(12.2);
$opciones_tabla['width'] = puntos_cm(6);
$opciones_tabla['showLines'] = 0;
$opciones_tabla['shaded'] = 2;
$opciones_tabla['shadeCol'] = array(1, 1, 1);
//$opciones_tabla['shadeCol2'] = array(0.054901961, 0.756862745, 0.196078431);
$opciones_tabla['shadeCol2'] = array(0.8984375, 0.95703125, 0.99609375);
$pdf->ezTable($datos, "", "", $opciones_tabla);
//roundRect($pdf, puntos_cm(12.2), puntos_cm(28.8), puntos_cm(6), puntos_cm(4.25));
/**
* ESTADO DE CUENTA
*/
$elementos = array(array('id_venta' => 'Venta', 'fecha' => 'Fecha', 'sucursal' => 'Sucursal', 'cajero' => 'Cajero', 'tipo_venta' => 'Tipo', 'tipo_pago' => 'Pago', 'total' => 'Total', 'pagado' => 'Pagado', 'saldo' => 'Saldo'));
foreach ($estado_cuenta->array_ventas as $venta) {
$array_venta = array();
$array_venta['id_venta'] = $venta['id_venta'];
$array_venta['fecha'] = $venta['fecha'];
$array_venta['sucursal'] = self::readableText($venta['sucursal']);
$array_venta['cajero'] = self::readableText($venta['cajero']);
$array_venta['cancelada'] = self::readableText($venta['cancelada']);
$array_venta['tipo_venta'] = self::readableText($venta['tipo_venta']);
//.........这里部分代码省略.........
示例4: set_y
public function set_y($y)
{
$this->pdf->ezSetY($y);
}
示例5: explode
$teamList[] = $tid;
}
if (strstr($key, 'team50_')) {
$parts = explode('_', $key);
$tid = $parts[1];
$teamList[] = $tid;
}
}
$diplomaType = $_POST['diplomaType'];
//echo("select * from tblSwimmer where id in (" . implode(',', $swimmerList) . ")");
$rsSwimmers = $db->diplomaSwimmers($id, $swimmerList);
$pdf = new Cezpdf();
$pdf->selectFont('./fonts/Times-Roman');
if ($diplomaType == 'HASI') {
$logo = $pdf->openObject();
$pdf->ezSetY(640);
$pdf->ezSetMargins(0, 0, 200, 200);
$pdf->ezImage('diploma/logo.jpg', 0, 195, 'none', 'left');
$pdf->closeObject();
$border = $pdf->openObject();
$pdf->ezSetY(803.4);
$pdf->ezSetMargins(0, 0, 23.8, 0);
$pdf->ezImage('diploma/border.jpg', 0, 547.4, 'none', 'left');
$pdf->closeObject();
$pdf->ezSetMargins(0, 0, 30, 30);
$firstPage = true;
$swimmername = '';
$clubname = '';
$date = date('d-m-Y', strtotime($aryCompo['date']));
$currentswimmer = -1;
while ($swimmer = $db->fetch_array($rsSwimmers)) {
示例6: array
}
}
}
if ($arySwimmer['devices'] != '') {
if ($hasnote === FALSE) {
$note++;
$aryRow['note'] = $note + 1 . ')';
$hasnote = TRUE;
$aryNotes[$note] = array('no' => $note + 1 . ')', 'text' => _('Hjælpemidler') . ' ' . $arySwimmer['distance'] . ': ' . $arySwimmer['devices']);
} else {
$aryNotes[$note]['text'] .= "\n" . _('Hjælpemidler') . ' ' . gettext_dist($arySwimmer['distance']) . ': ' . $arySwimmer['devices'];
}
}
$aryRow[$arySwimmer['distance']] = $arySwimmer['time'];
}
if (is_array($aryRow)) {
$aryData[$cnt] = $aryRow;
}
$pdf = new Cezpdf();
$pdf->selectFont('./fonts/Helvetica');
$pdf->ezSetY(830);
$pdf->ezText(_("Deltagerliste") . " " . $aryCompo['name'] . " - " . date('d-m-Y', strtotime($aryCompo['date'])), 18, array('justification' => 'center'));
$pdf->ezSetY(781);
$pdf->ezTable($aryData, array('Navn' => _('Navn'), 'Klub' => _('Klub'), '25' => _('25m'), '50' => _('50m'), '100' => _('100m'), 'note' => _('Note')), '', array('xPos' => 57, 'xOrientation' => 'right', 'width' => 481));
// 'Nr'=>'Nr',
if ($note >= 0) {
$pdf->ezTable($aryNotes, array('no' => '', 'text' => ''), '', array('showHeadings' => 0, 'showLines' => 0, 'shaded' => 0, 'xPos' => 57, 'xOrientation' => 'right', 'width' => 481, 'fontSize' => 10, 'titleFontSize' => 12, 'cols' => array('no' => array('width' => 30, 'justification' => 'center'))));
}
$pdf->ezStream();
}
$db->close();
示例7: array
/**
* Creates a PDF document and sends this pricelist to the client
*
* Unfortunately, ezpdf does not return anything after printing the
* document, so there's no way to tell whether it has succeeded.
* Thus, you should not rely on the return value, except when it is
* false -- in that case, loading of some data failed.
* @return boolean False on failure, true on supposed success
*/
function send_as_pdf()
{
global $objInit, $_ARRAYLANG;
if (!$this->load()) {
return \Message::error($_ARRAYLANG['TXT_SHOP_PRICELIST_ERROR_LOADING']);
}
$objPdf = new \Cezpdf('A4');
$objPdf->setEncryption('', '', array('print'));
$objPdf->selectFont(\Cx\Core\Core\Controller\Cx::instanciate()->getCodeBaseLibraryPath() . '/ezpdf/fonts/' . $this->font);
$objPdf->ezSetMargins(0, 0, 0, 0);
// Reset margins
$objPdf->setLineStyle(0.5);
$marginTop = 30;
$biggerCountTop = $biggerCountBottom = 0;
$arrHeaderLeft = $arrHeaderRight = $arrFooterLeft = $arrFooterRight = array();
if ($this->header) {
// header should be shown
$arrHeaderLeft = explode("\n", $this->header_left);
$arrHeaderRight = explode("\n", $this->header_right);
$countLeft = count($arrHeaderLeft);
$countRight = count($arrHeaderRight);
$biggerCountTop = $countLeft > $countRight ? $countLeft : $countRight;
$marginTop = $biggerCountTop * 14 + 36;
}
// Bottom margin
$marginBottom = 20;
$arrFooterRight = array();
if ($this->footer) {
// footer should be shown
// Old, obsolete:
$this->footer_left = str_replace('<--DATE-->', date(ASCMS_DATE_FORMAT_DATE, time()), $this->footer_left);
$this->footer_right = str_replace('<--DATE-->', date(ASCMS_DATE_FORMAT_DATE, time()), $this->footer_right);
// New:
$this->footer_left = str_replace('[DATE]', date(ASCMS_DATE_FORMAT_DATE, time()), $this->footer_left);
$this->footer_right = str_replace('[DATE]', date(ASCMS_DATE_FORMAT_DATE, time()), $this->footer_right);
$arrFooterLeft = explode("\n", $this->footer_left);
$arrFooterRight = explode("\n", $this->footer_right);
$countLeft = count($arrFooterLeft);
$countRight = count($arrFooterRight);
$biggerCountBottom = $countLeft > $countRight ? $countLeft : $countRight;
$marginBottom = $biggerCountBottom * 20 + 20;
}
// Borders
if ($this->border) {
$linesForAllPages = $objPdf->openObject();
$objPdf->saveState();
$objPdf->setStrokeColor(0, 0, 0, 1);
$objPdf->rectangle(10, 10, 575.28, 821.89);
$objPdf->restoreState();
$objPdf->closeObject();
$objPdf->addObject($linesForAllPages, 'all');
}
// Header
$headerArray = array();
$startpointY = 0;
if ($this->header) {
$objPdf->ezSetY(830);
$headerForAllPages = $objPdf->openObject();
$objPdf->saveState();
for ($i = 0; $i < $biggerCountTop; ++$i) {
$headerArray[$i] = array('left' => isset($arrHeaderLeft[$i]) ? $arrHeaderLeft[$i] : '', 'right' => isset($arrHeaderRight[$i]) ? $arrHeaderRight[$i] : '');
}
$tempY = $objPdf->ezTable($headerArray, '', '', array('showHeadings' => 0, 'fontSize' => $this->font_size_header, 'shaded' => 0, 'width' => 540, 'showLines' => 0, 'xPos' => 'center', 'xOrientation' => 'center', 'cols' => array('right' => array('justification' => 'right'))));
$tempY -= 5;
if ($this->border) {
$objPdf->setStrokeColor(0, 0, 0);
$objPdf->line(10, $tempY, 585.28, $tempY);
}
$startpointY = $tempY - 5;
$objPdf->restoreState();
$objPdf->closeObject();
$objPdf->addObject($headerForAllPages, 'all');
}
// Footer
$pageNumbersX = $pageNumbersY = $pageNumbersFont = 0;
if ($this->footer) {
$footerForAllPages = $objPdf->openObject();
$objPdf->saveState();
$tempY = $marginBottom - 5;
if ($this->border) {
$objPdf->setStrokeColor(0, 0, 0);
$objPdf->line(10, $tempY, 585.28, $tempY);
}
// length of the longest word
$longestWord = 0;
foreach ($arrFooterRight as $line) {
if ($longestWord < strlen($line)) {
$longestWord = strlen($line);
}
}
for ($i = $biggerCountBottom - 1; $i >= 0; --$i) {
//.........这里部分代码省略.........
示例8: Cezpdf
$dist = 25;
}
$_SESSION['distance'] = $dist;
if (!isset($_SESSION["round" . $dist])) {
$_SESSION["round" . $dist] = 0;
}
if (isset($_POST["round"])) {
$_SESSION["round" . $dist] = (int) (0 . $_POST['round']);
}
$round = $_SESSION["round" . $dist];
if ($aryCompo = $db->getCompetition($id)) {
// $rsHeats = mysql_query("select * from tblRace where competitionId = '$id' and distance = '$dist' and type = '$round' order by number");
$pdf = new Cezpdf();
$pdf->selectFont('./fonts/Helvetica');
$roundname = _('Stafet');
$pdf->ezSetY(830);
$pdf->ezText($aryCompo['name'] . " - " . date('d-m-Y', strtotime($aryCompo['date'])), 18, array('justification' => 'center'));
$pdf->ezText($roundname . ' ' . gettext_dist($dist), 16, array('justification' => 'center'));
$pdf->ezText('', 16, array('justification' => 'center'));
$rsSwimmers = $db->teamList($id, $dist);
$aryData = array();
$lane = 1;
$startTime = 0;
while ($arySwimmers = $db->fetch_array($rsSwimmers)) {
if ($startTime == 0) {
$startTime = $arySwimmers['time'];
}
$aryData[] = array('Bane' => $lane, 'Klub' => $arySwimmers['cname'], 'Starttal' => round($startTime - $arySwimmers['time']));
$teamSwimmers = $db->teamSwimmers($arySwimmers['id']);
while ($swimmer = $db->fetch_array($teamSwimmers)) {
$aryData[] = array('Bane' => '', 'Klub' => '- ' . $swimmer['name'], 'Starttal' => '');
示例9: date
// company name and details pulled from the my store address and phone number
// in admin configuration mystore
$y = $pdf->ezText(STORE_NAME_ADDRESS, COMPANY_HEADER_FONT_SIZE);
$y -= 10;
// logo image set to right of the above .. change first number to move sideways
//$pdf->addJpegFromFile(BATCH_PRINT_INC . 'templates/' . 'invoicelogo.jpg',365,730,85,85);
// extra info boxs to be used by staff
$pdf->setStrokeColor(0, 0, 0);
$pdf->setLineStyle(0.5);
$pdf->Rectangle(300, 745, 250, 70);
$pdf->addText(310, 785, GENERAL_FONT_SIZE, TEXT_PACKED_BY);
$pdf->addText(310, 760, GENERAL_FONT_SIZE, TEXT_VERIFIED_BY);
// line between header order number and order date
$pdf->setLineStyle(0.5);
$pdf->line(LEFT_MARGIN, $y, LINE_LENGTH, $y);
$pdf->ezSetY($y);
$dup_y = $y;
// order number
$y = $pdf->ezText("<b>" . TEXT_ORDER_NUMBER . " </b>" . $orders['orders_prefix'] . $orders['orders_id'] . "\n\n", SUB_HEADING_FONT_SIZE);
// order date
if ($_POST['show_order_date']) {
$pdf->ezSetY($dup_y);
$pdf->ezText("<b>" . TEXT_ORDER_DATE . " </b>" . date(TEXT_ORDER_FORMAT, strtotime($order->info['date_purchased'])) . "\n\n", SUB_HEADING_FONT_SIZE, array('justification' => 'right'));
}
// sold to info in left rectangle
$pdf->addText(LEFT_MARGIN, $y, SUB_HEADING_FONT_SIZE, "<b>" . ENTRY_SOLD_TO . "</b>");
$pos = $y;
$indent = LEFT_MARGIN + TEXT_BLOCK_INDENT;
$pdf->addText($indent, $pos -= GENERAL_LEADING, GENERAL_FONT_SIZE, $order->billing['name']);
if ($order->billing['company'] && $order->billing['company'] != 'NULL') {
$pdf->addText($indent, $pos -= GENERAL_LEADING, GENERAL_FONT_SIZE, $order->billing['company']);
示例10: kontenrahmen
function ihr_pdf_einzeln(Cezpdf &$pdf, $p_id)
{
$this->get_hga_profil_infos($p_id);
$this->p_ihr_gk_id;
$kk = new kontenrahmen();
$kontenrahmen_id = $kk->get_kontenrahmen('Geldkonto', $this->p_ihr_gk_id);
$bb = new buchen();
$kontostand11 = $bb->kontostand_tagesgenau_bis($this->p_ihr_gk_id, "01.01.{$this->p_jahr}");
if (!$kontostand11) {
$kontostand11 = $this->get_kontostand_manuell($this->p_ihr_gk_id, $this->p_jahr . "-01-01");
}
$kontostand11_a = nummer_punkt2komma_t($kontostand11);
$ze = 0;
$tab_arr[$ze]['TEXT'] = "I. Anfangsbestand 01.01.{$this->p_jahr}";
$tab_arr[$ze]['SOLL'] = "{$kontostand11_a} € ";
$tab_arr[$ze]['IST'] = "{$kontostand11_a} € ";
$ze++;
$soll_summe_wp = $this->get_soll_betrag_wp(6040, $this->p_wplan_id);
$soll_summe_wp_a = nummer_punkt2komma_t($soll_summe_wp);
$tab_arr[$ze]['TEXT'] = "II. Soll-Zuführung zur Rücklage laut WP";
$tab_arr[$ze]['SOLL'] = "";
$tab_arr[$ze]['IST'] = "{$soll_summe_wp_a} € ";
$ze++;
$iii_arr[] = $this->III_tab_anzeigen_pdf($p_id);
if (is_array($iii_arr)) {
$iii_arr = $iii_arr[0];
for ($a = 0; $a < sizeof($iii_arr); $a++) {
$text3 = $iii_arr[$a]['TEXT'];
$ist3 = $iii_arr[$a]['IST'];
$tab_arr[$ze]['TEXT'] = $text3;
$tab_arr[$ze]['IST'] = $ist3;
$ze++;
}
}
$soll_endbestand = $kontostand11 + $soll_summe_wp;
$soll_endbestand_a = nummer_punkt2komma_t($soll_endbestand);
$tab_arr[$ze]['TEXT'] = "IV. Soll-Endbestand 31.12.{$this->p_jahr}";
$tab_arr[$ze]['SOLL'] = "";
$tab_arr[$ze]['IST'] = "{$soll_endbestand_a} € ";
$n_jahr = $this->p_jahr + 1;
$kontostand11 = $bb->kontostand_tagesgenau_bis($this->p_ihr_gk_id, "01.01.{$n_jahr}");
if (!$kontostand11) {
$kontostand11 = $this->get_kontostand_manuell($this->p_ihr_gk_id, $this->p_jahr . "-12-31");
}
$kontostand11_a = nummer_punkt2komma_t($kontostand11);
$ze++;
$tab_arr[$ze]['TEXT'] = "V. Endbestand 31.12.{$this->p_jahr}";
$tab_arr[$ze]['SOLL'] = "";
$tab_arr[$ze]['IST'] = "{$kontostand11_a} € ";
$this->footer_zahlungshinweis = $bpdf->zahlungshinweis;
$pdf->setColor(0.6, 0.6, 0.6);
$pdf->filledRectangle(50, 690, 500, 15);
$pdf->setColor(0, 0, 0);
$pdf->ezSety(720);
// $pdf->ezSetY(650);
$datum = date("d.m.Y");
$p = new partners();
$p->get_partner_info($_SESSION['partner_id']);
$pdf->ezText("{$p->partner_ort}, den {$datum}", 10, array('justification' => 'right'));
$pdf->ezSetY(705);
$o = new objekt();
$o->get_objekt_infos($this->p_objekt_id);
$pdf->ezText(" <b>Entwicklung der Instandhaltungsrücklage {$this->p_jahr} | OBJEKT: {$o->objekt_kurzname}</b>", 10, array('justification' => 'full'));
$pdf->ezSetDy(-15);
$pdf->ezStopPageNumbers();
// seitennummerirung beenden
$p = new partners();
$p->get_partner_info($_SESSION['partner_id']);
$cols = array('TEXT' => "", 'IST' => "IST-BETRAG");
$pdf->ezTable($tab_arr, $cols, "", array('rowGap' => 1.5, 'showLines' => 1, 'showHeadings' => 1, 'shaded' => 1, 'shadeCol' => array(0.9, 0.9, 0.9), 'titleFontSize' => 7, 'fontSize' => 10, 'xPos' => 'left', 'xOrientation' => 'right', 'width' => 500, 'cols' => array('TEXT' => array('justification' => 'left'), 'SOLL' => array('justification' => 'right', 'width' => 100), 'IST' => array('justification' => 'right', 'width' => 100))));
$this->get_hga_profil_infos($p_id);
$d = new detail();
$anteile_g = $d->finde_detail_inhalt('OBJEKT', $this->p_objekt_id, 'Gesamtanteile');
$einheiten_arr = $this->einheiten_weg_tabelle_arr($this->p_objekt_id);
$anz_einheiten = count($einheiten_arr);
$anz_konten = count($tab_arr);
$gkkk = new geldkonto_info();
$gkkk->geld_konto_details($this->p_ihr_gk_id);
$datum_heute = date("d.m.Y");
$kontostand_aktuell = nummer_punkt2komma_t($bb->kontostand_tagesgenau_bis($this->p_ihr_gk_id, "{$datum_heute}"));
for ($a = 0; $a < $anz_einheiten; $a++) {
$pdf->ezNewPage();
$e_kn = $einheiten_arr[$a]['EINHEIT_KURZNAME'];
$einheit_id = $einheiten_arr[$a]['EINHEIT_ID'];
$einheit_anteile = $d->finde_detail_inhalt('EINHEIT', $einheit_id, 'WEG-Anteile');
$pdf->setColor(0.6, 0.6, 0.6);
$pdf->filledRectangle(50, 690, 500, 15);
$pdf->setColor(0, 0, 0);
$pdf->ezSety(720);
$pdf->ezText("{$p->partner_ort}, den {$datum}", 10, array('justification' => 'right'));
$pdf->ezSetDy(-2);
$pdf->ezText("<b> Anteil in der Instandhaltungsrücklage für {$e_kn} | OBJEKT: {$o->objekt_kurzname} {$this->p_jahr}</b>", 10, array('justification' => 'full'));
$pdf->ezSetDy(-10);
$pdf->ezText("<b>Geldkontobezeichnung:</b> {$gkkk->geldkonto_bez}", 9);
$pdf->ezText("<b>Geldinstitut:</b> {$gkkk->kredit_institut}", 9);
$pdf->ezText("<b>IBAN:</b> {$gkkk->IBAN1}", 9);
$pdf->ezText("<b>BIC:</b> {$gkkk->BIC}", 9);
for ($b = 0; $b < $anz_konten; $b++) {
$tab_arr_e[$b]['TEXT'] = $tab_arr[$b]['TEXT'];
$tab_arr_e[$b]['IST'] = $tab_arr[$b]['IST'];
//.........这里部分代码省略.........
示例11: upload_file_to_client_pdf
function upload_file_to_client_pdf($file_to_send)
{
//Function reads a HTML file and converts to pdf.
global $STMT_TEMP_FILE_PDF;
global $srcdir;
if ($GLOBALS['statement_appearance'] == '1') {
require_once "{$srcdir}/html2pdf/vendor/autoload.php";
$pdf2 = new HTML2PDF($GLOBALS['pdf_layout'], $GLOBALS['pdf_size'], $GLOBALS['pdf_language'], true, 'UTF-8', array($GLOBALS['pdf_left_margin'], $GLOBALS['pdf_top_margin'], $GLOBALS['pdf_right_margin'], $GLOBALS['pdf_bottom_margin']), $_SESSION['language_direction'] == 'rtl' ? true : false);
ob_start();
echo readfile($file_to_send, "r");
//this file contains the HTML to be converted to pdf.
//echo $file;
$content = ob_get_clean();
// Fix a nasty html2pdf bug - it ignores document root!
global $web_root, $webserver_root;
$i = 0;
$wrlen = strlen($web_root);
$wsrlen = strlen($webserver_root);
while (true) {
$i = stripos($content, " src='/", $i + 1);
if ($i === false) {
break;
}
if (substr($content, $i + 6, $wrlen) === $web_root && substr($content, $i + 6, $wsrlen) !== $webserver_root) {
$content = substr($content, 0, $i + 6) . $webserver_root . substr($content, $i + 6 + $wrlen);
}
}
$pdf2->WriteHTML($content);
$temp_filename = $STMT_TEMP_FILE_PDF;
$content_pdf = $pdf2->Output($STMT_TEMP_FILE_PDF, 'F');
} else {
$pdf = new Cezpdf('LETTER');
//pdf creation starts
$pdf->ezSetMargins(45, 9, 36, 10);
$pdf->selectFont('Courier');
$pdf->ezSetY($pdf->ez['pageHeight'] - $pdf->ez['topMargin']);
$countline = 1;
$file = fopen($file_to_send, "r");
//this file contains the text to be converted to pdf.
while (!feof($file)) {
$OneLine = fgets($file);
//one line is read
if (stristr($OneLine, "\f") == true && !feof($file)) {
$pdf->ezNewPage();
$pdf->ezSetY($pdf->ez['pageHeight'] - $pdf->ez['topMargin']);
str_replace("\f", "", $OneLine);
}
if (stristr($OneLine, 'REMIT TO') == true || stristr($OneLine, 'Visit Date') == true || stristr($OneLine, 'Future Appointments') == true || stristr($OneLine, 'Current') == true) {
//lines are made bold when 'REMIT TO' or 'Visit Date' is there.
$pdf->ezText('<b>' . $OneLine . '</b>', 12, array('justification' => 'left', 'leading' => 6));
} else {
$pdf->ezText($OneLine, 12, array('justification' => 'left', 'leading' => 6));
}
$countline++;
}
$fh = @fopen($STMT_TEMP_FILE_PDF, 'w');
//stored to a pdf file
if ($fh) {
fwrite($fh, $pdf->ezOutput());
fclose($fh);
}
}
header("Pragma: public");
//this section outputs the pdf file to browser
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/force-download");
header("Content-Length: " . filesize($STMT_TEMP_FILE_PDF));
header("Content-Disposition: attachment; filename=" . basename($STMT_TEMP_FILE_PDF));
header("Content-Description: File Transfer");
readfile($STMT_TEMP_FILE_PDF);
// flush the content to the browser. If you don't do this, the text from the subsequent
// output from this script will be in the file instead of sent to the browser.
flush();
exit;
//added to exit from process properly in order to stop bad html code -ehrlive
// sleep one second to ensure there's no follow-on.
sleep(1);
}
示例12: GradebookDataGenerator
$stud_id = api_is_allowed_to_edit() ? null : $stud_id;
$allcat = $cats[0]->get_subcategories($stud_id, $course_code, $session_id);
$alleval = $cats[0]->get_evaluations($stud_id, true);
$alllink = $cats[0]->get_links($stud_id, true);
if (isset($_GET['exportpdf'])) {
$datagen = new GradebookDataGenerator($allcat, $alleval, $alllink);
$header_names = array(get_lang('Name'), get_lang('Description'), get_lang('Weight'), get_lang('Date'), get_lang('Results'));
$data_array = $datagen->get_data(GradebookDataGenerator::GDG_SORT_NAME, 0, null, true);
$newarray = array();
foreach ($data_array as $data) {
$newarray[] = array_slice($data, 1);
}
$pdf = new Cezpdf();
$pdf->selectFont(api_get_path(LIBRARY_PATH) . 'ezpdf/fonts/Courier.afm');
$pdf->ezSetMargins(30, 30, 50, 30);
$pdf->ezSetY(810);
$pdf->ezText(get_lang('FlatView') . ' (' . api_convert_and_format_date(null, DATE_FORMAT_SHORT) . ' ' . api_convert_and_format_date(null, TIME_NO_SEC_FORMAT) . ')', 12, array('justification' => 'center'));
$pdf->line(50, 790, 550, 790);
$pdf->line(50, 40, 550, 40);
$pdf->ezSetY(750);
$pdf->ezTable($newarray, $header_names, '', array('showHeadings' => 1, 'shaded' => 1, 'showLines' => 1, 'rowGap' => 3, 'width' => 500));
$pdf->ezStream();
exit;
}
} else {
//Student view
//in any other case (no search, no pdf), print the available gradebooks
// Important note: loading a category will actually load the *contents* of
// this category. This means that, to show the categories of a course,
// we have to show the root category and show its subcategories that
// are inside this course. This is done at the time of calling
示例13: creaPDF
//.........这里部分代码省略.........
$telefono = isset($row_empresa['telefono']) ? $row_empresa['telefono'] : "";
$emisor .= "\nTel: " . $telefono . "\n";
$mail = isset($row_empresa['mail']) ? $row_empresa['mail'] : "";
$emisor .= "\n" . $mail;
$emisor1 = utf8_decode($emisorNode['nombre']);
$sucursal = "";
if ($expedidoNode != "") {
if (utf8_decode($row_sucursal['sucursal']) == "Q") {
$tipoSucursal = utf8_decode('Querétaro');
} else {
if (utf8_decode($row_sucursal['sucursal']) == "F") {
$tipoSucursal = utf8_decode('5/6');
} else {
if (utf8_decode($row_sucursal['sucursal']) == "S") {
$tipoSucursal = utf8_decode('Santa Fe');
}
}
}
$sucursal = "Sucursal " . $tipoSucursal . "\n";
if (utf8_decode($row_sucursal['sucursal']) != "S") {
$noInteriorExpedido = isset($expedidoNode['noInterior']) ? $expedidoNode['noInterior'] : "";
$sucursal .= utf8_decode($expedidoNode['calle'] . " " . $expedidoNode['noExterior'] . " ") . "\n";
$sucursal .= utf8_decode($expedidoNode['colonia']) . "\n";
$sucursal .= utf8_decode($expedidoNode['municipio']) . ", " . utf8_decode($expedidoNode['estado']) . "\n";
$sucursal .= "CP " . utf8_decode($expedidoNode['codigoPostal']) . " " . utf8_decode($expedidoNode['pais']);
}
}
////////// i. Nombre del emisor
$colNames = array();
$tableData = array(array("dato" => $emisor1));
$colOptions = array("dato" => array('justification' => 'left', 'width' => 200));
$options = array('showLines' => 0, 'showHeadings' => 0, 'shaded' => 0, 'shadeCol' => array(1, 1, 1), 'fontSize' => 9, 'textCol' => array(0, 0, 0), 'rowGap' => 0, 'colGap' => 0, 'xPos' => 200, 'xOrientation' => 'right', 'width' => 200, 'cols' => $colOptions, 'innerLineThickness' => 0.3, 'outerLineThickness' => 0.3);
// Dibuja la tabla nombre del emisor
$pdf->ezSetY(765);
$pdf->ezTable($tableData, $colNames, "", $options);
////////// i. Datos del emisor y de la sucursal
$tableData = array(array("emisor" => $emisor, "espacio" => "", "sucursal" => $sucursal));
$colOptions = array("emisor" => array('justification' => 'left', 'width' => 150), "espacio" => array('justification' => 'left', 'width' => 3), "sucursal" => array('justification' => 'left', 'width' => 100));
$options = array('showLines' => 0, 'showHeadings' => 0, 'shaded' => 0, 'shadeCol' => array(1, 1, 1), 'fontSize' => 7, 'textCol' => array(0, 0, 0), 'rowGap' => 0, 'colGap' => 0, 'xPos' => 190, 'xOrientation' => 'right', 'width' => 335, 'cols' => $colOptions, 'innerLineThickness' => 0.3, 'outerLineThickness' => 0.3);
// Dibuja la tabla
$pdf->ezTable($tableData, "", "", $options);
////////// i. Datos del documento
$foliodocto = rellena("0", 6, $comprobanteNode['folio']);
$seriedocto = $comprobanteNode['serie'];
if (!empty($seriedocto)) {
$foliodocto = $seriedocto . "-" . rellena("0", 6, $comprobanteNode['folio']);
}
$fechastr = $comprobanteNode['fecha'];
$fechatok = explode("T", $fechastr);
$toksf = explode("-", $fechatok[0]);
$fechastr = $toksf[2] . "-" . $toksf[1] . "-" . $toksf[0] . " " . $fechatok[1];
$fechastrcfdi = $row_factura['FechaTimbrado'];
$ncert = $comprobanteNode['noCertificado'];
$aprob = $row_factura['noCertificadoSAT'];
//chs
$tableData = array(array("dato" => "<b>" . $tipoDocto1 . $tipoDocto2 . $tipoDocto3 . "</b>"), array("dato" => "<b>" . $foliodocto . "</b>"), array("dato" => "FECHA DE EMISION"), array("dato" => $fechastr), array("dato" => "LUGAR DE EXPEDICION"), array("dato" => utf8_decode($info_xtra->LugarExpedicion)), array("dato" => "FECHA DE CERTIFICACION"), array("dato" => $fechastrcfdi), array("dato" => "No. de Serie del Certificado del Emisor"), array("dato" => $ncert), array("dato" => "No. de Serie del Certificado del SAT"), array("dato" => $aprob), array("dato" => "Folio Fiscal"), array("dato" => $row_factura['uuid']));
$colOptions = array("dato" => array('justification' => 'left', 'width' => 120));
/*JASR*/
$options = array('showLines' => 1, 'showHeadings' => 0, 'shaded' => 2, 'shadeCol' => array(1, 1, 1), 'shadeCol2' => array(0.9, 0.9, 0.9), 'fontSize' => 7, 'textCol' => array(1, 1, 1), 'rowGap' => 2, 'colGap' => 5, 'xPos' => 455, 'xOrientation' => 'right', 'width' => 120, 'cols' => $colOptions, 'innerLineThickness' => 0.3, 'outerLineThickness' => 0.3);
// Dibuja la tabla datos del documento
$pdf->ezSetDy(70);
$pdf->ezTable($tableData, "", "", $options);
////////// i. Datos del cliente
$noInterior = isset($receptordomicilioNode['noInterior']) ? utf8_decode($receptordomicilioNode['noInterior']) : "";
$municipio = isset($receptordomicilioNode['municipio']) ? $receptordomicilioNode['municipio'] : "";
$localidadCliente = isset($receptordomicilioNode['localidad']) ? utf8_decode($receptordomicilioNode['localidad']) : "";
示例14: define
// the cell padding effect
define('PRODUCT_TABLE_LEFT_MARGIN', '2');
// Height of the product listing rectangles
define('PRODUCT_TABLE_ROW_HEIGHT', '11');
// The column sizes are where the product listing columns start on the
// PDF page, if you make the TABLE HEADER FONT SIZE any larger you will
// need to tweak these values to prevent text from clashing together
define('PRODUCTS_COLUMN_SIZE', '165');
define('PRODUCT_LISTING_BKGD_COLOR', GREY);
define('MODEL_COLUMN_SIZE', '37');
define('PRICING_COLUMN_SIZES', '67');
$currencies = new currencies();
$pdf->selectFont(BATCH_PDF_DIR . 'Helvetica.afm');
$pdf->setFontFamily(BATCH_PDF_DIR . 'Helvetica.afm');
//watermark
$pdf->addJpegFromFile(BATCH_PRINT_INC . 'templates/' . 'watermark.jpg', 30, 110, 550, 550);
// company name and details pulled from the my store address and phone number
// in admin configuration mystore
//$pdf->addJpegFromFile('./invoicelogo.jpg',23,150,567,567);
//$pdf->addText(132,489,70,"YOUR WATERMARK",-45);
$y = $pdf->ezText(STORE_NAME_ADDRESS, COMPANY_HEADER_FONT_SIZE);
$y -= 10;
// logo image set to right of the above .. change first number to move sideways
$pdf->addJpegFromFile(BATCH_PRINT_INC . 'templates/' . 'invoicelogo.jpg', 480, 730, 85, 85);
// line between header and rest of page
$pdf->setLineStyle(1);
$pdf->line(LEFT_MARGIN, $y, LINE_LENGTH, $y);
$pdf->ezSetY($y);
$dup_y = $y;
$pos -= SECTION_DIVIDER;
}
示例15: Cezpdf
Released under the GNU General Public License
*/
// set paper type and size
if ($pageloop == "0") {
$pdf = new Cezpdf(A4, portrait);
} else {
$pdf->selectFont(BATCH_PDF_DIR . 'Helvetica.afm');
$pdf->setFontFamily(BATCH_PDF_DIR . 'Helvetica.afm');
$y = 10;
$i = 0;
do {
$i++;
$y = $y + 20;
$pdf->setLineStyle(1);
$pdf->line(0, $y, 600, $y);
$pdf->addText(0, $y, 8, "{$y}");
$pdf->ezSetY($y);
$dup_y = $y;
} while ($i < 40);
$x = 10;
$i = 0;
do {
$i++;
$x = $x + 20;
$pdf->setLineStyle(1);
$pdf->line($x, 0, $x, 900);
$pdf->addText($x, 0, 8, "{$x}");
$pdf->ezSetY($x);
$dup_x = $x;
} while ($i < 30);
}