本文整理汇总了PHP中PDF::SetAutoPageBreak方法的典型用法代码示例。如果您正苦于以下问题:PHP PDF::SetAutoPageBreak方法的具体用法?PHP PDF::SetAutoPageBreak怎么用?PHP PDF::SetAutoPageBreak使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PDF
的用法示例。
在下文中一共展示了PDF::SetAutoPageBreak方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setup
/**
* PDF Setup - WT_Report_PDF
*/
function setup()
{
parent::setup();
// Setup the PDF class with custom size pages because WT supports more page sizes. If WT sends an unknown size name then the default would be A4
$this->pdf = new PDF($this->orientation, parent::unit, array($this->pagew, $this->pageh), self::unicode, "UTF-8", self::diskcache);
// Setup the PDF margins
$this->pdf->setMargins($this->leftmargin, $this->topmargin, $this->rightmargin);
$this->pdf->SetHeaderMargin($this->headermargin);
$this->pdf->SetFooterMargin($this->footermargin);
//Set auto page breaks
$this->pdf->SetAutoPageBreak(true, $this->bottommargin);
// Set font subsetting
$this->pdf->setFontSubsetting(self::subsetting);
// Setup PDF compression
$this->pdf->SetCompression(self::compression);
// Setup RTL support
$this->pdf->setRTL($this->rtl);
// Set the document information
// Only admin should see the version number
$appversion = WT_WEBTREES;
if (Auth::isAdmin()) {
$appversion .= " " . WT_VERSION;
}
$this->pdf->SetCreator($appversion . " (" . parent::wt_url . ")");
// Not implemented yet - WT_Report_Base::setup()
$this->pdf->SetAuthor($this->rauthor);
$this->pdf->SetTitle($this->title);
$this->pdf->SetSubject($this->rsubject);
$this->pdf->SetKeywords($this->rkeywords);
$this->pdf->setReport($this);
if ($this->showGenText) {
// The default style name for Generated by.... is 'genby'
$element = new CellPDF(0, 10, 0, "C", "", "genby", 1, ".", ".", 0, 0, "", "", true);
$element->addText($this->generatedby);
$element->setUrl(parent::wt_url);
$this->pdf->addFooter($element);
}
}
示例2: saveDocument
public static function saveDocument($dataObject, $path, $fileName)
{
if (file_exists($path . $fileName)) {
unlink($path . $fileName);
}
try {
/*Document*/
$data = Builder::buildDocument($dataObject);
if ($data == null) {
throw new Exception("Can't build document based on " . get_class($dataObject));
}
if ($data->metadata != null) {
/*Property*/
$pageSizeProperty = $data->metadata->getPropertyByName(Property::$PAGE_FORMAT);
if ($pageSizeProperty != null) {
if ($pageSizeProperty->value == Property::$PAGE_FORMAT_A4) {
$data->width = Document::$pageFormats['a4'][0];
$data->height = Document::$pageFormats['a4'][1];
} else {
if ($pageSizeProperty->value == Property::$PAGE_FORMAT_A4_ALBUM) {
$data->width = Document::$pageFormats['a4'][1];
$data->height = Document::$pageFormats['a4'][0];
}
}
}
}
$pdfwr = null;
Log::log(LoggingConstants::MYDEBUG, "PDF: create file");
if (!is_numeric($data->width)) {
$pdfwr = new PDF("P", "pt", $data->width);
} else {
$pdfwr = new PDF("P", "pt", array($data->width, $data->height));
}
$pdfwr->SetAutoPageBreak(false);
//, abs($data->marginBottom));
$data->write($pdfwr);
Log::log(LoggingConstants::MYDEBUG, "WRITE FINISHED");
$pdfwr->Output($path . $fileName, "F");
} catch (Exception $exception) {
Log::log(LoggingConstants::MYDEBUG, $exception->getMessage() . "\n" . $exception->getTrace());
throw $exception;
}
// fwrite($fileHandler, $buf);
// fclose($fileHandler);
}
示例3: initPDF
protected function initPDF()
{
$pdf = new PDF('P', 'mm', 'A4', _CHARSET_ == 'UTF-8', _CHARSET_, false);
$pdf->AddPage();
$pdf->SetAutoPageBreak(FALSE);
$pdf->footerLeft = $this->senderAddressLine;
$pdf->footerCenter = $this->senderContactInfo;
$pdf->footerRight = $this->senderData['www'] . "\n" . $this->senderData['email'];
$this->pdf = $pdf;
}
示例4: printHeader
private function printHeader($format, $printFields, $startDate, $endDate)
{
if ($format == 'pdf' || $format == 'pdfl') {
ob_end_clean();
$pdf = new PDF($format == 'pdf' ? 'P' : 'L', 'mm', 'A4', _CHARSET_ == 'UTF-8', _CHARSET_, false);
$pdf->setTopMargin(20);
$pdf->headerRight = $GLOBALS['locReportPage'];
$pdf->printHeaderOnFirstPage = true;
$pdf->AddPage();
$pdf->SetAutoPageBreak(TRUE, 15);
$pdf->setY(10);
$pdf->SetFont('Helvetica', 'B', 12);
$pdf->Cell(100, 15, $GLOBALS['locInvoiceReport'], 0, 1, 'L');
if ($startDate || $endDate) {
$pdf->SetFont('Helvetica', '', 8);
$pdf->Cell(25, 15, $GLOBALS['locDateInterval'], 0, 0, 'L');
$pdf->Cell(50, 15, dateConvDBDate2Date($startDate) . ' - ' . dateConvDBDate2Date($endDate), 0, 1, 'L');
}
$pdf->SetFont('Helvetica', 'B', 8);
if (in_array('invoice_no', $printFields)) {
$pdf->Cell(18, 4, $GLOBALS['locInvoiceNumber'], 0, 0, 'L');
}
if (in_array('invoice_date', $printFields)) {
$pdf->Cell(20, 4, $GLOBALS['locInvDate'], 0, 0, 'L');
}
if (in_array('due_date', $printFields)) {
$pdf->Cell(20, 4, $GLOBALS['locDueDate'], 0, 0, 'L');
}
if (in_array('payment_date', $printFields)) {
$pdf->Cell(20, 4, $GLOBALS['locPaymentDate'], 0, 0, 'L');
}
if (in_array('company_name', $printFields)) {
$pdf->Cell(45, 4, $GLOBALS['locPayer'], 0, 0, 'L');
}
if (in_array('status', $printFields)) {
$pdf->Cell(20, 4, $GLOBALS['locInvoiceState'], 0, 0, 'L');
}
if (in_array('ref_number', $printFields)) {
$pdf->Cell(25, 4, $GLOBALS['locReferenceNumber'], 0, 0, 'L');
}
if (in_array('sums', $printFields)) {
$pdf->Cell(25, 4, $GLOBALS['locVATLess'], 0, 0, 'R');
$pdf->Cell(25, 4, $GLOBALS['locVATPart'], 0, 0, 'R');
$pdf->Cell(25, 4, $GLOBALS['locWithVAT'], 0, 1, 'R');
}
$this->pdf = $pdf;
return;
}
?>
<div class="report">
<table>
<tr>
<?php
if (in_array('invoice_no', $printFields)) {
?>
<th class="label">
<?php
echo $GLOBALS['locInvoiceNumber'];
?>
</th>
<?php
}
if (in_array('invoice_date', $printFields)) {
?>
<th class="label">
<?php
echo $GLOBALS['locInvDate'];
?>
</th>
<?php
}
if (in_array('due_date', $printFields)) {
?>
<th class="label">
<?php
echo $GLOBALS['locDueDate'];
?>
</th>
<?php
}
if (in_array('payment_date', $printFields)) {
?>
<th class="label">
<?php
echo $GLOBALS['locPaymentDate'];
?>
</th>
<?php
}
if (in_array('company_name', $printFields)) {
?>
<th class="label">
<?php
echo $GLOBALS['locPayer'];
?>
</th>
<?php
}
if (in_array('status', $printFields)) {
?>
//.........这里部分代码省略.........
示例5: printHeader
protected function printHeader($format)
{
if ($format == 'pdf') {
ob_end_clean();
$pdf = new PDF('P', 'mm', 'A4', _CHARSET_ == 'UTF-8', _CHARSET_, false);
$pdf->setTopMargin(20);
$pdf->headerRight = $GLOBALS['locReportPage'];
$pdf->printHeaderOnFirstPage = true;
$pdf->AddPage();
$pdf->SetAutoPageBreak(TRUE, 15);
$pdf->setY(10);
$pdf->SetFont('Helvetica', 'B', 12);
$pdf->Cell(100, 5, $GLOBALS['locProductStockReport'], 0, 1, 'L');
$pdf->SetFont('Helvetica', 'B', 8);
$pdf->Cell(50, 10, date($GLOBALS['locDateFormat']), 0, 1, 'L');
$pdf->Cell(15, 4, $GLOBALS['locCode'], 0, 0, 'L');
$pdf->Cell(40, 4, $GLOBALS['locProduct'], 0, 0, 'L');
$pdf->Cell(25, 4, $GLOBALS['locUnitPrice'], 0, 0, 'R');
$pdf->Cell(25, 4, $GLOBALS['locPurchasePrice'], 0, 0, 'R');
$pdf->Cell(25, 4, $GLOBALS['locStockBalance'], 0, 0, 'R');
$pdf->Cell(25, 4, $GLOBALS['locStockValue'], 0, 1, 'R');
$this->pdf = $pdf;
return;
}
?>
<div class="report">
<table>
<tr>
<th class="label">
<?php
echo $GLOBALS['locCode'];
?>
</th>
<th class="label">
<?php
echo $GLOBALS['locProduct'];
?>
</th>
<th class="label" style="text-align: right">
<?php
echo $GLOBALS['locUnitPrice'];
?>
</th>
<th class="label" style="text-align: right">
<?php
echo $GLOBALS['locPurchasePrice'];
?>
</th>
<th class="label" style="text-align: right">
<?php
echo $GLOBALS['locStockBalance'];
?>
</th>
<th class="label" style="text-align: right">
<?php
echo $GLOBALS['locStockValue'];
?>
</th>
</tr>
<?php
}
示例6: pdf_pagehead
/**
* Show header of page for PDF generation
*
* @param PDF $pdf Object PDF
* @param Translate $outputlangs Object lang for output
* @param int $page_height Height of page
* @return void
*/
function pdf_pagehead(&$pdf, $outputlangs, $page_height)
{
global $conf;
// Add a background image on document
if (!empty($conf->global->MAIN_USE_BACKGROUND_ON_PDF)) {
$pdf->SetAutoPageBreak(0, 0);
// Disable auto pagebreak before adding image
$pdf->Image($conf->mycompany->dir_output . '/logos/' . $conf->global->MAIN_USE_BACKGROUND_ON_PDF, isset($conf->global->MAIN_USE_BACKGROUND_ON_PDF_X) ? $conf->global->MAIN_USE_BACKGROUND_ON_PDF_X : 0, isset($conf->global->MAIN_USE_BACKGROUND_ON_PDF_Y) ? $conf->global->MAIN_USE_BACKGROUND_ON_PDF_Y : 0, 0, $page_height);
$pdf->SetAutoPageBreak(1, 0);
// Restore pagebreak
}
}
示例7: Footer
for ($x = 1; $x < $this->label_per_width; $x++) {
$xpos = $x * $this->label_width;
$this->Line($xpos, $ystart, $xpos, $yend);
}
}
//Page footer
function Footer()
{
}
}
$pdf = new PDF('P', 'mm', 'A4');
$pdf->setTitle('J&G Package Labels');
$pdf->SetAuthor('JULIE GRACE');
$pdf->SetCreator('k-Auto Generated PDF');
$pdf->SetDisplayMode('real');
$pdf->SetAutoPageBreak(false, 1);
$pdf->left_margin = 2;
$pdf->top_margin = 2;
$pdf->page_width = 210;
$pdf->page_height = 297;
$pdf->label_per_width = 1;
$pdf->label_width = ($pdf->page_width - 2 * $pdf->left_margin) / $pdf->label_per_width;
$pdf->label_per_height = 5;
$pdf->label_height = ($pdf->page_height - 2 * $pdf->top_margin) / $pdf->label_per_height;
$pdf->label_per_page = $pdf->label_per_width * $pdf->label_per_height;
$order_counter = 0;
//$labelpad = 4;
$labelxpad = 55;
$labelypad = 4;
$labelxpos = 1;
$labelypos = 1;
示例8: PDF
$top = 28;
$c1x = 13;
$c2x = $c1x + $w;
$c3x = $c2x + $w;
$c4x = $c3x + $w;
$c1h = 170;
$c2h = $c1h / 2;
$c3h = $c2h / 2;
$c4h = $c3h / 2;
$bottom = $top + $c1h;
$pdf = new PDF('L', 'mm', 'Letter');
$pdf->Open();
$pdf->SetTopMargin(13);
$pdf->SetLeftMargin(13);
$pdf->SetRightMargin(10);
$pdf->SetAutoPageBreak(True, 13);
$pdf->AddPage();
$pdf->SetCreator($_SERVER["PHP_SELF"]);
$pdf->SetAuthor("Keith Morrison, keithm@infused.org");
$pdf->SetTitle(sprintf(gtc("Pedigree for %s"), $o->full_name()));
$pdf->SetSubject(gtc("Genealogy"));
# Person 1
$pdf->SetY($top);
$pdf->SetX($c1x);
$pdf->Cell($w, $c1h, '', 1, 0, 'L');
$pdf->SetY($top + $c1h / 2 - 6);
$pdf->SetX($c1x);
$pdf->SetFont($font, 'B', 10);
$pdf->MultiCell($w, 4, isset($g_node_strings[1][0]) ? $g_node_strings[1][0] : '', 0, 'L');
$pdf->SetFont($font, '', 10);
$pdf->Cell($w, 4, isset($g_node_strings[1][1]) ? $g_node_strings[1][1] : '', 0, 2, 'L');
示例9: tgl
//$this->Image('assets/images/logo.jpg', 30, 5,80,11.2);
$this->Ln(7);
$this->SetFont('Arial', 'B', 17);
$this->Cell(128, 7, 'KARTU ORDER', 0, 0, 'C');
$this->Ln(7);
}
}
require_once './assets/qrcode/qrcode.php';
// definisi class
$pdf = new PDF('P', 'mm', 'A5');
// A% = 148 x 210
// variable awal
date_default_timezone_set('Asia/Jakarta');
$pdf->SetMargins(10, 5, 10);
//$pdf->AliasNbPages();
$pdf->SetAutoPageBreak('on', 0);
//margin bottom set to 0
//$pdf->SetLineWidth(0.5);
function tgl($date)
{
setlocale(LC_TIME, 'INDONESIAN');
$st = strftime("%d/%m/%Y", strtotime($date));
//return strtoupper($st);
return $st;
}
function baking($data)
{
if ($data == 1) {
return 'BAKING';
}
}
示例10: PDF
$ln .= $per->getDisplayName();
//add spouse
$ln .= get_spouse_string($per);
// --------------------------------------------------
// echo "<br>\n";
//$albero=$ln;
$albero = make_Descendants($per);
// viewarray($albero);
// echo $albero[131];
// exit;
set_time_limit(0);
$pdf = new PDF();
$pdf->Open();
$pdf->Title = $strDescendants . " {$strOf} " . $per->getDisplayName();
$pdf->aliasNbPages();
$pdf->SetAutoPageBreak('true', '10');
$pdf->AddPage();
$pdf->SetFont('Arial', 'B', 15);
// Move to the right
$pdf->Cell(80);
// Title
$pdf->Cell(30, 10, $pdf->Title, 0, 0, 'C');
// Line break
$pdf->Ln(2);
$pdf->SetY(10 + $pdf->tMargin);
$pdf->SetX($pdf->lMargin);
// $pdf->SetY($pdf->tMargin);
// $pdf->SetX($pdf->lMargin);
$pdf->SetFont('Arial', '', 10);
$vspacing = 1;
if (is_array($albero)) {
示例11: exportDo
//.........这里部分代码省略.........
$submittedfields = $row["submittedfields"];
$submittedfields = preg_replace("/~/", ";~", $submittedfields, 1);
$logdate = $row["logdate"];
$downloaded = $row["downloaded"];
$submittedfields = str_replace("\ntest;", "", $submittedfields);
$submittedfields = str_replace("test;", "", $submittedfields);
$submittedfields = str_replace("~", "", $submittedfields);
$submittedfieldsArray = explode(";", $submittedfields);
$addVar = count($submittedfieldsArray) / 2;
for($i == 0; $i < $addVar; $i++) {
$myArray[$ii][$submittedfieldsArray[$i]] = $submittedfieldsArray[$i+$addVar];
}
$ii++;
}
} else {
$res = $GLOBALS["TYPO3_DB"]->exec_SELECTquery("field_name, field_value, email_uid", "tx_pksaveformmail_fields", "pid=" . intval($pageId), "", "", "") or die("884: ".mysql_error());
while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
$uid = $row["uid"];
$pid = $row["pid"];
$crdate = $row["crdate"];
$email_uid = $row["email_uid"];
$field_name = $row["field_name"];
$field_value = $row["field_value"];
$myArray[$email_uid][$field_name] = $field_value;
}
}*/
$GLOBALS["TYPO3_DB"]->sql_free_result($res);
switch ($choices) {
case "cblPdfList":
$pdf = new PDF();
$pdf->AddPage("L", "A4");
$pdf->SetAutoPageBreak(false);
if ($lextra) {
$pdf->SetFont('Helvetica', 'B', 14);
$pdf->Cell(300, 10, $lextra, 0, 1, C, 0);
$pdf->Ln(2);
}
$pdf->SetMargins(10, 10);
$pdf->SetFont('Helvetica', '', 9);
break;
case "cblLabels":
$pdf = new PDF();
$pdf->AddPage("P", "A4");
$pdf->SetMargins(0, 0);
$pdf->SetAutoPageBreak(false);
$pdf->SetFont('Helvetica', '', 9);
break;
}
$antalPoster = count($resultArray);
/*print "<pre>";
print_r($resultArray);
print "</pre>";
die();*/
ksort($resultArray);
ksort($chosenFieldsArray);
foreach ($resultArray as $key => $value) {
$zz++;
foreach ($chosenFieldsArray as $key1 => $value1) {
switch ($choices) {
case "cblPdfList":
$pdf->SetMargins(10, 10);
//Ny rad
if ($key != $old_key and $z > 0) {
$pdf->Ln(6);
示例12: Fuente
$this->Cell($txtAncho, 5, utf8_decode($txt), $borde, 0, $align, $relleno);
}
function Fuente($tipo = "B", $tam = 10)
{
$this->SetFillColor(234, 234, 234);
$this->SetFont("Arial", $tipo, $tam);
}
function CuadroCuerpoMulti($txtAncho, $txt, $relleno = 0, $align = "L", $borde = 1, $tam = 9, $tipo = "")
{
$this->Fuente($tipo, $tam);
$this->MultiCell($txtAncho, 3.5, utf8_decode($txt), $borde, $align, $relleno);
}
}
$borde = 0;
$pdf = new PDF("P", "mm", array(298, 208));
$pdf->SetAutoPageBreak(0, 0);
$pdf->Fuente("");
$pdf->AddPage();
$x = 0;
$TipoDoc = "Archivo";
$pdf->SetXY($x + 25, 35);
$pdf->CuadroCuerpo(30, $TipoDoc, 0, "L", $borde, 11);
$pdf->SetXY($x + 70, 5);
$pdf->CuadroCuerpo(60, "Dr(a). " . mayuscula($med['Nombres'] . " " . $med['Paterno'] . " " . $med['Materno']), 0, "L", $borde, 10);
$pdf->SetXY($x + 80, 10);
$pdf->CuadroCuerpo(60, $opt['CodOptica'] . " - " . $opt['NumeroBoleta'], 0, "C", $borde, 10);
$pdf->SetXY($x + 108, 40);
$pdf->CuadroCuerpo(30, fecha2Str($opt['FechaEmitido']), 0, "C", $borde, 11);
$pdf->SetXY($x + 108, 43);
$pdf->CuadroCuerpo(30, $opt['HoraEmitido'], 0, "C", $borde, 10);
$pdf->SetXY($x + 25, 47);
示例13: getBpartner
function getBpartner($accounts_id)
{
global $xoopsDB, $defaultorganization_id, $tableaccounts, $tablebpartner;
$retval = "";
$sql = "select * from {$tablebpartner} where accounts_id = {$accounts_id} ";
$query = $xoopsDB->query($sql);
if ($row = $xoopsDB->fetchArray($query)) {
$retval = $row['bpartner_name'];
}
return $retval;
}
if (isset($_POST["submit"])) {
$wherestr = "";
$pdf = new PDF('P', 'mm', 'A4');
$pdf->AliasNbPages();
$pdf->SetAutoPageBreak(true, 17);
$pdf->datefrom = $_POST['datefrom'];
$pdf->dateto = $_POST['dateto'];
$pdf->accounts_codefrom = getAccountsID($_POST['accounts_codefrom']);
$pdf->accounts_codeto = getAccountsID($_POST['accounts_codeto']);
if ($pdf->datefrom == "") {
$pdf->datefrom = "0000-00-00";
}
if ($pdf->dateto == "") {
$pdf->dateto = "9999-12-31";
}
if ($pdf->accounts_codefrom == "") {
$pdf->accounts_codefrom = "0000000";
}
if ($pdf->accounts_codeto == "") {
$pdf->accounts_codeto = "9999999";
示例14: createPDF
function createPDF($ignoreStockStatusDepot = false, $output = 'D', $add_to_daily_statistic = false, $print_per_orders = true)
{
/*
OUTPUT : D -> WILL PRODUCE ONE PDF FOR ALL ORDERS WITH ITEMS IN IT
OUTPUT : F -> WILL PRODUCE MULTI PDF PER ORDER ITEMS
*/
global $class_jo, $class_o, $class_do;
$pi_printed_jg = array();
$pi_printed_sp = array();
$pi_printed_dp = array();
if ($output == 'D') {
//PRODUCE SINGLE PDF FILE
$pdf = new PDF('P', 'mm', 'A4');
$pdf->setTitle('Production Instruction');
$pdf->SetAuthor('JULIE GRACE / Bonofactum');
$pdf->SetCreator('k-Auto Generated PDF');
$pdf->SetDisplayMode('real');
$pdf->SetAutoPageBreak(false);
$pdf->AliasNbPages();
$pdf->SetFillColor(191, 191, 191);
}
$item_printed = 0;
$oiid_last_printed = '';
/* Moved this on function constructPIContent and replace using below $print_per_orders,
* so eventhough we use $output='F' we still could create pi which consists of collection of orders */
//foreach($this->orders as $order) {
// $o = $order['detail'];
// foreach($order['items'] as $oiid=>$i) {
// if($i['status']<8) $this->pi_printed[strtolower($o['type'])][] = $oiid;
// //if($i['status']<8) ${'pi_printed_'.strtolower($o['type'])}[] = $oiid;
// $this->constructPIContent($pdf, $output, $order, $oiid, $ignoreStockStatusDepot, $print_per_orders);
// $item_printed++;
// $oiid_last_printed = $oiid;
// }
//}
if ($print_per_orders) {
foreach ($this->orders as $order) {
$this->constructPIContent($pdf, $output, $order, $ignoreStockStatusDepot, true);
$item_printed++;
}
} else {
$this->constructPIContent($pdf, $output, $this->orders, $ignoreStockStatusDepot, false);
}
#PI Print Counter
if (count($this->pi_printed['sp']) > 0) {
$class_jo->printCountAdd($this->pi_printed['sp']);
}
if (count($this->pi_printed['jg']) > 0) {
$class_o->printCountAdd($this->pi_printed['jg']);
}
if (count($this->pi_printed['dp']) > 0) {
$class_do->printCountAdd($this->pi_printed['dp']);
}
/* D: Download; F: Save File on Server */
if ($output == 'D') {
$infix = '';
//$infix = count($this->orders)>1 ? '' : strtoupper($o['type']).'O'.$o['id'].'-';
//if($item_printed==1) $infix = strtoupper($o['type']).'-'.$oiid_last_printed.'-';
if ($item_printed == 1) {
$infix = array_keys($this->orders);
$infix = $infix[0] . '-';
}
$filename = 'PI-' . $infix . date('YmdHi');
$pdf->Output($filename . '.pdf', $output);
//$pdf->Output($filename.'.pdf','D');
}
if ($add_to_daily_statistic) {
$pt = new production_target();
$timestamp = date('Y-m-d H:i:s');
if ($this->qty_total_first_printed > 0) {
$pt->addDataToField($timestamp, 'start', $this->qty_total_first_printed);
}
}
}
示例15: Footer
}
function Footer()
{
$timestamp = date("d/m/y H:i:s", time());
//Position at 1.5 cm from bottom
$this->SetY($this->pagefooterheight * -1);
//Arial italic 8
$this->SetFont('courier', 'I', 8);
$this->Cell(0, 5, 'Page ' . $this->PageNo() . '/{nb} Generated dated ' . $timestamp, 0, 0, 'C');
}
}
if (isset($_POST["submit"])) {
$wherestr = "";
$pdf = new PDF('P', 'mm', 'A4');
$pdf->AliasNbPages();
$pdf->SetAutoPageBreak(true, $pdf->pagefooterheight + 1);
$organization_id = $_REQUEST['organization_id'];
$org->fetchOrganization($organization_id);
$companyno = $org->companyno;
$orgname = $org->organization_name;
$organization_code = $org->organization_code;
$pdf->datefrom = $_POST['datefrom'];
$pdf->dateto = $_POST['dateto'];
// $pdf->accounts_codefrom=getAccountsID($_POST['accounts_codefrom']);
// $pdf->accounts_codeto=getAccountsID($_POST['accounts_codeto']);
if ($pdf->datefrom == "") {
$pdf->datefrom = "0000-00-00";
}
if ($pdf->dateto == "") {
$pdf->dateto = "9999-12-31";
}