本文整理汇总了PHP中PDF::SetSubject方法的典型用法代码示例。如果您正苦于以下问题:PHP PDF::SetSubject方法的具体用法?PHP PDF::SetSubject怎么用?PHP PDF::SetSubject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PDF
的用法示例。
在下文中一共展示了PDF::SetSubject方法的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: automaticSummaryInPDF
function automaticSummaryInPDF($submission)
{
$countryDao =& DAORegistry::getDAO('CountryDAO');
$articleDrugInfoDao =& DAORegistry::getDAO('ArticleDrugInfoDAO');
$extraFieldDAO =& DAORegistry::getDAO('ExtraFieldDAO');
$journal =& Request::getJournal();
$submitter =& $submission->getUser();
$title = $journal->getJournalTitle();
$articleTexts = $submission->getArticleTexts();
$articleTextLocales = $journal->getSupportedLocaleNames();
$secIds = $submission->getArticleSecIds();
$details = $submission->getArticleDetails();
$purposes = $submission->getArticlePurposes();
$articlePrimaryOutcomes = $submission->getArticleOutcomesByType(ARTICLE_OUTCOME_PRIMARY);
$articleSecondaryOutcomes = $submission->getArticleOutcomesByType(ARTICLE_OUTCOME_SECONDARY);
$coutryList = $countryDao->getCountries();
$articleDrugs = $submission->getArticleDrugs();
$pharmaClasses = $articleDrugInfoDao->getPharmaClasses();
$drugStudyClasses = $articleDrugInfoDao->getClassKeysMap();
$articleSites = $submission->getArticleSites();
$expertisesList = $extraFieldDAO->getExtraFieldsList(EXTRA_FIELD_THERAPEUTIC_AREA, EXTRA_FIELD_ACTIVE);
$fundingSources = $submission->getArticleFundingSources();
$pSponsor = $submission->getArticlePrimarySponsor();
$sSponsors = $submission->getArticleSecondarySponsors();
$CROs = $submission->getArticleCROs();
$contact = $submission->getArticleContact();
Locale::requireComponents(array(LOCALE_COMPONENT_APPLICATION_COMMON, LOCALE_COMPONENT_OJS_EDITOR, LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_PKP_USER));
import('classes.lib.tcpdf.pdf');
import('classes.lib.tcpdf.tcpdf');
$pdf = new PDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor($submitter->getFullName());
$pdf->SetTitle($title);
$subject = $submission->getProposalId() . ' - ' . Locale::translate('submission.summary');
$pdf->SetSubject($subject);
$cell_width = 45;
$cell_height = 6;
// set default header data
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE . ' 020', 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, 58, PDF_MARGIN_RIGHT);
$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);
$pdf->AddPage();
// Title
$pdf->SetFont('Times', 'B', 15);
$w = $pdf->GetStringWidth($title) + 6;
$pdf->SetX((210 - $w) / 2);
$pdf->Cell($w, 9, $title, 0, 1, 'C');
// sub-title
$pdf->SetFont('Times', 'BI', 14);
$w2 = $pdf->GetStringWidth($subject) + 6;
$pdf->SetX((210 - $w2) / 2);
$pdf->Cell($w2, 9, $subject, 0, 1, 'C');
// Line break
$pdf->Ln(10);
// Main Info
$pdf->SetFont('Times', '', 12);
$pdf->MultiRow(50, Locale::translate("common.proposalId"), $submission->getProposalId(), 'L');
$pdf->MultiRow(50, Locale::translate("article.title"), $submission->getScientificTitle(), 'L');
$pdf->MultiRow(50, Locale::translate("submission.submitter"), $submitter->getFullName(), 'L');
$pdf->MultiRow(50, Locale::translate("common.dateSubmitted"), $submission->getDateSubmitted(), 'L');
// Line break
$pdf->Ln(10);
//CT Information
$pdf->SetFont('Times', 'B', 14);
$pdf->Cell(190, 9, 'I' . Locale::translate('common.queue.long.articleDetails', array('id' => '')), 0, 1, 'L');
$pdf->Ln(5);
$pdf->SetFont('Times', '', 12);
$scientificTitle = null;
foreach ($articleTexts as $atKey => $articleText) {
if (!$scientificTitle) {
$pdf->MultiRow(50, Locale::translate("proposal.scientificTitle"), $articleText->getScientificTitle() . ' (' . $articleTextLocales[$atKey] . ')', 'L');
$scientificTitle = true;
} else {
$pdf->MultiRow(50, '', $articleText->getScientificTitle() . ' (' . $articleTextLocales[$atKey] . ')', 'L');
}
}
$publicTitle = null;
foreach ($articleTexts as $atKey => $articleText) {
if (!$publicTitle) {
$pdf->MultiRow(50, Locale::translate("proposal.publicTitle"), $articleText->getPublicTitle() . ' (' . $articleTextLocales[$atKey] . ')', 'L');
$publicTitle = true;
} else {
$pdf->MultiRow(50, '', $articleText->getPublicTitle() . ' (' . $articleTextLocales[$atKey] . ')', 'L');
}
}
$pdf->Ln(3);
$firstSecId = null;
foreach ($secIds as $secId) {
if (!$firstSecId) {
//.........这里部分代码省略.........
示例3: Footer
parent::Header();
}
function Footer()
{
//Position at 1.5 cm from bottom
$this->SetY(-15);
//Arial italic 8
$this->SetFont('Arial', 'I', 8);
//Page number
$this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');
}
}
$pdf = new PDF('L', $unit = 'mm', $format = 'A4');
$pdf->AliasNbPages();
$pdf->SetAuthor("imranzahid+nexexcel@gmail.com");
$pdf->SetSubject("Daily Sales");
$pdf->SetTitle("Daily Sales");
$pdf->SetCreator("Imran Zahid");
$prop = array('color1' => array(255, 255, 255), 'color2' => array(255, 255, 255), 'color3' => array(128, 128, 128), 'padding' => 2, 'font' => array('Arial', '', 10), 'thfont' => array('Arial', 'B', 10));
$pdf->AddPage();
$pdf->AddCol('party_name', "20%", 'Party', 'L');
$pdf->AddCol('vendor', "20%", 'Vendor', 'L');
$pdf->AddCol('cat_name', "20%", 'Category', 'L');
$pdf->AddCol('description', "20%", 'Item', 'L');
$pdf->AddCol("cs", "10%", 'CS', 'R');
$pdf->AddCol("pc", "10%", 'PC', 'R');
$pdf->Table($data, $prop);
$_cMargin = $pdf->cMargin;
$pdf->cMargin = $prop['padding'];
$pdf->SetFont('Arial', 'B', 10);
$pdf->Cell(221.59806666667, 6, "Total", 1, 0, 'C');
示例4: PDF
//Position at 1.5 cm from bottom
$this->SetY(-15);
//Arial italic 8
$this->SetFont('Arial', 'I', 8);
//Page number
//$this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');
$this->SetX($this->lMargin);
$this->Cell(0, 10, 'Please consider the environment before printing this report', 0, 0, 'L');
$this->SetX($this->lMargin);
$this->Cell(0, 10, 'Report generated by nexexcel.com', 0, 0, 'R');
}
}
$pdf = new PDF('P', 'mm', 'A5');
$pdf->AliasNbPages();
$pdf->SetAuthor("imranzahid+nexexcel@gmail.com");
$pdf->SetSubject("Purchase Return");
$pdf->SetTitle("Purchase Return");
$pdf->SetCreator("Imran Zahid");
$prop = array('HeaderColor' => array(0, 0, 0), 'HeaderTextColor' => array(255, 255, 255), 'color1' => array(217, 217, 217), 'color2' => array(255, 255, 255), 'textcolor1' => array(0, 0, 0), 'textcolor2' => array(0, 0, 0), 'padding' => 2, 'font' => array('Arial', '', 8), 'thfont' => array('Arial', 'B', 8));
$title = $_title;
$pdf->AddPage();
$where = "";
if (strlen($_GET['invoice']) > 0) {
$input = $_GET['invoice'];
$rangeCharacters = "0123456789, -";
$billnos = array();
$ret = containsOnly($input, $rangeCharacters);
if (containsOnly($input, $rangeCharacters)) {
$ranges = explode(",", $input);
for ($j = 0; $j < count($ranges); $j++) {
$range = trim($ranges[$j]);
示例5: PDF
//Position at 1.5 cm from bottom
$this->SetY(-15);
//Arial italic 8
$this->SetFont('Arial', 'I', 8);
//Page number
//$this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');
$this->SetX($this->lMargin);
$this->Cell(0, 10, 'Please consider the environment before printing this report', 0, 0, 'L');
$this->SetX($this->lMargin);
$this->Cell(0, 10, 'Report generated by nexexcel.com', 0, 0, 'R');
}
}
$pdf = new PDF('L');
$pdf->AliasNbPages();
$pdf->SetAuthor("imranzahid+nexexcel@gmail.com");
$pdf->SetSubject("Sales Comparision");
$pdf->SetTitle("Sales Comparision");
$pdf->SetCreator("Imran Zahid");
foreach ($regionals as $city => $regional) {
$prop = array('HeaderColor' => array(0, 0, 0), 'HeaderTextColor' => array(255, 255, 255), 'color1' => array(217, 217, 217), 'color2' => array(255, 255, 255), 'textcolor1' => array(0, 0, 0), 'textcolor2' => array(0, 0, 0), 'padding' => 1, 'formatNumber' => TRUE, 'font' => array('Arial', '', 8), 'thfont' => array('Arial', 'B', 10));
$ndata = $regional['data'];
$totals = $regional['totals'];
$pdf->AddPage();
$pdf->AddCol('vendor', '16%', 'Vendor', 'L');
foreach ($months as $month) {
$pdf->AddCol($month, '7%', $month, 'R');
}
$pdf->Table($ndata, $prop);
$prop['font'] = array('Arial', 'B', 10);
$ndata = array();
$ndata[] = $totals;
示例6: PDF
//Position at 1.5 cm from bottom
$this->SetY(-15);
//Arial italic 8
$this->SetFont('Arial', 'I', 8);
//Page number
//$this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');
$this->SetX($this->lMargin);
$this->Cell(0, 10, 'Please consider the environment before printing this report', 0, 0, 'L');
$this->SetX($this->lMargin);
$this->Cell(0, 10, 'Report generated by nexexcel.com', 0, 0, 'R');
}
}
$pdf = new PDF('L');
$pdf->AliasNbPages();
$pdf->SetAuthor("imranzahid+nexexcel@gmail.com");
$pdf->SetSubject("Sales Vendor Party");
$pdf->SetTitle("Sales Vendor Party");
$pdf->SetCreator("Imran Zahid");
$prop = array('HeaderColor' => array(0, 0, 0), 'HeaderTextColor' => array(255, 255, 255), 'color1' => array(217, 217, 217), 'color2' => array(255, 255, 255), 'textcolor1' => array(0, 0, 0), 'textcolor2' => array(0, 0, 0), 'padding' => 2, 'formatNumber' => TRUE, 'font' => array('Arial', '', 10), 'thfont' => array('Arial', 'B', 12));
$pdf->AddPage();
$pdf->AddCol('seq', '8%', 'Inv No', 'L');
$pdf->AddCol('cno', '5%', 'C-No', 'L');
$pdf->AddCol('description', '47%', 'Item Description', 'L');
$pdf->AddCol('sales_qty', '8%', 'Quantity', 'R');
$pdf->AddCol('sales_rate', '8%', 'Rate', 'R');
$pdf->AddCol('circular_rate', '8%', 'Circular', 'R');
$pdf->AddCol('fix_rate', '8%', 'Fix Rate', 'R');
$pdf->AddCol('diff', '8%', 'Difference', 'R');
$pdf->Table($data, $prop);
$prop['font'] = array('Arial', 'B', 12);
$data = array($tdata);
示例7: PDF
//Position at 1.5 cm from bottom
$this->SetY(-15);
//Arial italic 8
$this->SetFont('Arial', 'I', 8);
//Page number
$this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');
$this->SetX($this->lMargin);
$this->Cell(0, 10, 'Please consider the environment before printing this report', 0, 0, 'L');
$this->SetX($this->lMargin);
$this->Cell(0, 10, 'Report generated by nexexcel.com', 0, 0, 'R');
}
}
$pdf = new PDF('L');
$pdf->AliasNbPages();
$pdf->SetAuthor("imranzahid+nexexcel@gmail.com");
$pdf->SetSubject("Order Report");
$pdf->SetTitle("Order Report");
$pdf->SetCreator("Imran Zahid");
$prop = array('HeaderColor' => array(0, 0, 0), 'HeaderTextColor' => array(255, 255, 255), 'color1' => array(217, 217, 217), 'color2' => array(255, 255, 255), 'textcolor1' => array(0, 0, 0), 'textcolor2' => array(0, 0, 0), 'padding' => 2, 'font' => array('Arial', '', 8), 'thfont' => array('Arial', 'B', 10));
$pdf->AddPage();
$pdf->AddCol('sno', '5%', 'S.No.', 'C');
$pdf->AddCol('CNo', '10%', 'Date', 'L');
$pdf->AddCol('party_name', '20%', 'Manufacturer #', 'L');
$pdf->AddCol('item', '40%', 'Item Name', 'L');
$pdf->AddCol('qty', '15%', 'Quantity', 'R');
$pdf->AddCol('unit', '10%', 'Unit', 'L');
$pdf->Table($data, $prop);
$pdf->Output("order_invoice.pdf", "D");
} else {
if ($_GET['report'] == 'xls') {
require_once '../../Classes/PHPExcel.php';
示例8: PDF
$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');
$pdf->Cell($w, 4, isset($g_node_strings[1][2]) ? $g_node_strings[1][2] : '', 0, 0, 'L');
# Person 2
$pdf->SetY($top);
$pdf->SetX($c2x);
$pdf->Cell($w, $c2h, '', 1, 0, 'L');
示例9: PDF
//Position at 1.5 cm from bottom
$this->SetY(-15);
//Arial italic 8
$this->SetFont('Arial', 'I', 8);
//Page number
$this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');
$this->SetX($this->lMargin);
$this->Cell(0, 10, 'Please consider the environment before printing this report', 0, 0, 'L');
$this->SetX($this->lMargin);
$this->Cell(0, 10, 'Report generated by nexexcel.com', 0, 0, 'R');
}
}
$pdf = new PDF();
$pdf->AliasNbPages();
$pdf->SetAuthor("imranzahid+nexexcel@gmail.com");
$pdf->SetSubject("PL Statement");
$pdf->SetTitle("PL Statement");
$pdf->SetCreator("Imran Zahid");
$prop = array('color1' => array(255, 255, 255), 'color2' => array(255, 255, 255), 'color3' => array(128, 128, 128), 'padding' => 2, 'formatNumber' => TRUE, 'formatNumberDecimal' => 2, 'font' => array('Arial', '', 8), 'thfont' => array('Arial', 'B', 10));
$title = $_title;
$totals = array("sales" => array($rows[0]['Cash Sales'] + $rows[0]['Credit Sales'], $rows[1]['Cash Sales'] + $rows[1]['Credit Sales'], $rows[2]['Cash Sales'] + $rows[2]['Credit Sales']), "sales_return_discount" => array($rows[0]['Sales Return'] + $rows[0]['Sales Discount'], $rows[1]['Sales Return'] + $rows[1]['Sales Discount'], $rows[2]['Sales Return'] + $rows[2]['Sales Discount']), "purchase" => array($rows[0]['Cash Purchase'] + $rows[0]['Credit Purchase'], $rows[1]['Cash Purchase'] + $rows[1]['Credit Purchase'], $rows[2]['Cash Purchase'] + $rows[2]['Credit Purchase']), "purchase_return_discount" => array($rows[0]['Purchase Return'] + $rows[0]['Purchase Discount'], $rows[1]['Purchase Return'] + $rows[1]['Purchase Discount'], $rows[2]['Purchase Return'] + $rows[2]['Purchase Discount']));
$totals['net_sales'] = array($totals['sales'][0] - $totals['sales_return_discount'][0], $totals['sales'][1] - $totals['sales_return_discount'][1], $totals['sales'][2] - $totals['sales_return_discount'][2]);
$totals['net_purchase'] = array($totals['purchase'][0] - $totals['purchase_return_discount'][0], $totals['purchase'][1] - $totals['purchase_return_discount'][1], $totals['purchase'][2] - $totals['purchase_return_discount'][2]);
$totals['cogs'] = array($rows[0]['Open Inventory'] + $totals['net_purchase'][0] - $rows[1]['Close Inventory'], $rows[1]['Open Inventory'] + $totals['net_purchase'][1] - $rows[1]['Close Inventory'], $rows[2]['Open Inventory'] + $totals['net_purchase'][2] - $rows[2]['Close Inventory']);
$totals['gross_profit'] = array($totals['net_sales'][0] - $totals['cogs'][0], $totals['net_sales'][1] - $totals['cogs'][1], $totals['net_sales'][2] - $totals['cogs'][2]);
$totals['net_profit_loss'] = array($totals['gross_profit'][0] - $rows[0]['Total Expenses'], $totals['gross_profit'][1] - $rows[1]['Total Expenses'], $totals['gross_profit'][2] - $rows[2]['Total Expenses']);
$data = array(array("description" => "Cash Sales", "yr1" => number_format($rows[0]['Cash Sales'], 2), "yr2" => number_format($rows[1]['Cash Sales'], 2), "yr3" => number_format($rows[2]['Cash Sales'], 2)), array("description" => "Credit Sales", "yr1" => number_format($rows[0]['Credit Sales'], 2), "yr2" => number_format($rows[1]['Credit Sales'], 2), "yr3" => number_format($rows[2]['Credit Sales'], 2)), array("description" => "Total Sales", "yr1" => number_format($totals['sales'][0], 2), "yr2" => number_format($totals['sales'][1], 2), "yr3" => number_format($totals['sales'][2], 2)), array("description" => "", "yr1" => "", "yr2" => "", "yr3" => ""), array("description" => "Sales Return", "yr1" => number_format($rows[0]['Sales Return'], 2), "yr2" => number_format($rows[1]['Sales Return'], 2), "yr3" => number_format($rows[2]['Sales Return'], 2)), array("description" => "Sales Discount", "yr1" => number_format($rows[0]['Sales Discount'], 2), "yr2" => number_format($rows[1]['Sales Discount'], 2), "yr3" => number_format($rows[2]['Sales Discount'], 2)), array("description" => "Total", "yr1" => number_format($totals['sales_return_discount'][0], 2), "yr2" => number_format($totals['sales_return_discount'][1], 2), "yr3" => number_format($totals['sales_return_discount'][2], 2)), array("description" => "", "yr1" => "", "yr2" => "", "yr3" => ""), array("description" => "Net Sales", "yr1" => number_format($totals['net_sales'][0], 2), "yr2" => number_format($totals['net_sales'][1], 2), "yr3" => number_format($totals['net_sales'][2], 2), "hilite" => "Y"), array("description" => "", "yr1" => "", "yr2" => "", "yr3" => ""), array("description" => "Opening Inventory", "yr1" => number_format($rows[0]['Open Inventory'], 2), "yr2" => number_format($rows[1]['Open Inventory'], 2), "yr3" => number_format($rows[2]['Open Inventory'], 2)), array("description" => "", "yr1" => "", "yr2" => "", "yr3" => ""), array("description" => "Cash Purchase", "yr1" => number_format($rows[0]['Cash Purchase'], 2), "yr2" => number_format($rows[1]['Cash Purchase'], 2), "yr3" => number_format($rows[2]['Cash Purchase'], 2)), array("description" => "Credit Purchase", "yr1" => number_format($rows[0]['Credit Purchase'], 2), "yr2" => number_format($rows[1]['Credit Purchase'], 2), "yr3" => number_format($rows[2]['Credit Purchase'], 2)), array("description" => "Total Purchase", "yr1" => number_format($totals['purchase'][0], 2), "yr2" => number_format($totals['purchase'][1], 2), "yr3" => number_format($totals['purchase'][2], 2)), array("description" => "", "yr1" => "", "yr2" => "", "yr3" => ""), array("description" => "Purchase Return", "yr1" => number_format($rows[0]['Purchase Return'], 2), "yr2" => number_format($rows[1]['Purchase Return'], 2), "yr3" => number_format($rows[2]['Purchase Return'], 2)), array("description" => "Purchase Discount", "yr1" => number_format($rows[0]['Purchase Discount'], 2), "yr2" => number_format($rows[1]['Purchase Discount'], 2), "yr3" => number_format($rows[2]['Purchase Discount'], 2)), array("description" => "Total", "yr1" => number_format($totals['purchase_return_discount'][0], 2), "yr2" => number_format($totals['purchase_return_discount'][1], 2), "yr3" => number_format($totals['purchase_return_discount'][2], 2)), array("description" => "", "yr1" => "", "yr2" => "", "yr3" => ""), array("description" => "Net Purchase", "yr1" => number_format($totals['net_purchase'][0], 2), "yr2" => number_format($totals['net_purchase'][1], 2), "yr3" => number_format($totals['net_purchase'][2], 2), "hilite" => "Y"), array("description" => "", "yr1" => "", "yr2" => "", "yr3" => ""), array("description" => "Closing Inventory", "yr1" => number_format($rows[0]['Close Inventory'], 2), "yr2" => number_format($rows[1]['Close Inventory'], 2), "yr3" => number_format($rows[2]['Close Inventory'], 2)), array("description" => "Cost of Goods Sold", "yr1" => number_format($totals['cogs'][0], 2), "yr2" => number_format($totals['cogs'][1], 2), "yr3" => number_format($totals['cogs'][2], 2), "hilite" => "Y"), array("description" => "", "yr1" => "", "yr2" => "", "yr3" => ""), array("description" => "Gross Profit", "yr1" => number_format($totals['gross_profit'][0], 2), "yr2" => number_format($totals['gross_profit'][1], 2), "yr3" => number_format($totals['gross_profit'][2], 2)), array("description" => "Total Expenses", "yr1" => number_format($rows[0]['Total Expenses'], 2), "yr2" => number_format($rows[1]['Total Expenses'], 2), "yr3" => number_format($rows[2]['Total Expenses'], 2)), array("description" => "", "yr1" => "", "yr2" => "", "yr3" => ""));
$tempTotal = array("description" => "Net Other Income", "yr1" => (double) 0, "yr2" => (double) 0, "yr3" => (double) 0, "hilite" => "Y");
$max = max(count($rows[0]['Other Income']), count($rows[1]['Other Income']), count($rows[2]['Other Income']));
for ($i = 0; $i < $max; $i++) {
$temp = array("description" => "", "yr1" => (double) 0, "yr2" => (double) 0, "yr3" => (double) 0);
示例10: Footer
}
$this->SetFont('Arial', 'B', 8);
$this->Cell($col1, 6, "Remarks", 0, 0, 'L', true);
$this->SetFont('Arial', '', 8);
$this->Cell($col2 + $col1 + $col2 + $xspace, 6, $voucher_remarks, 'B', 1, 'L');
$this->Ln(2);
parent::Header();
}
function Footer()
{
}
}
$pdf = new PDF();
$pdf->AliasNbPages();
$pdf->SetAuthor("imranzahid+nexexcel@gmail.com");
$pdf->SetSubject("Voucher");
$pdf->SetTitle("Voucher");
$pdf->SetCreator("Imran Zahid");
$prop = array('HeaderColor' => array(0, 0, 0), 'HeaderTextColor' => array(255, 255, 255), 'color1' => array(217, 217, 217), 'color2' => array(255, 255, 255), 'textcolor1' => array(0, 0, 0), 'textcolor2' => array(0, 0, 0), 'padding' => 1, 'formatNumber' => TRUE, 'formatNumberDecimal' => 0, 'printZero' => FALSE, 'font' => array('Arial', '', 8), 'thfont' => array('Arial', 'B', 8));
foreach ($ndata as $data) {
$prop['font'] = array('Arial', '', 8);
$voucher_id = $data['seq'];
$voucher_date = $data['voucher_date_fmt'];
$voucher_type = $data['voucher_type'];
$voucher_by = $data['voucher_by'];
$voucher_remarks = $data['voucher_remarks'];
$pdf->AddPage();
$pdf->AddCol('account_name', '30%', 'Account Name', 'L');
$pdf->AddCol('remarks', '40%', 'Remarks', 'L');
$pdf->AddCol('debit_amount', '15%', 'Debit', 'R');
$pdf->AddCol('credit_amount', '15%', 'Credit', 'R');
示例11: PDF
//Position at 1.5 cm from bottom
$this->SetY(-15);
//Arial italic 8
$this->SetFont('Arial', 'I', 8);
//Page number
$this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');
$this->SetX($this->lMargin);
$this->Cell(0, 10, 'Please consider the environment before printing this report', 0, 0, 'L');
$this->SetX($this->lMargin);
$this->Cell(0, 10, 'Report generated by nexexcel.com', 0, 0, 'R');
}
}
$pdf = new PDF();
$pdf->AliasNbPages();
$pdf->SetAuthor("imranzahid+nexexcel@gmail.com");
$pdf->SetSubject("Account Outstanding");
$pdf->SetTitle("Account Outstanding");
$pdf->SetCreator("Imran Zahid");
$prop = array('HeaderColor' => array(0, 0, 0), 'HeaderTextColor' => array(255, 255, 255), 'color1' => array(217, 217, 217), 'color2' => array(255, 255, 255), 'textcolor1' => array(0, 0, 0), 'textcolor2' => array(0, 0, 0), 'padding' => 2, 'font' => array('Arial', '', 8), 'thfont' => array('Arial', 'B', 10));
$cityName = "";
if (isset($_GET['region']) && strlen($_GET['region']) > 0) {
$ndata = array();
foreach ($outstanding as $ret) {
if ($ret == NULL) {
continue;
}
foreach ($ret['data'] as $row) {
$city = $row['party_city'];
if (!isset($ndata["{$city}"])) {
$ndata["{$city}"] = array();
$ndata["{$city}"]['data'] = array();
示例12: PDF
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* letter_non_embedded certificate type
*
* @package mod_certificate
* @copyright Mark Nelson <markn@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die;
$pdf = new PDF($certificate->orientation, 'pt', 'A4', true, 'UTF-8', false);
$pdf->SetAuthor('Ananda Gestión, S.L.');
$pdf->SetTitle('Certificado de Acreditación');
$pdf->SetSubject('Curso Prevención de Riesgos Laborales');
$pdf->SetMargins(75, 20, 75, true);
$pdf->SetProtection(array('modify'));
$pdf->setPrintHeader(false);
$pdf->setPrintFooter(false);
$pdf->SetAutoPageBreak(false, 0);
$pdf->AddPage();
//página 1
// Define variables
// Landscape
if ($certificate->orientation == 'L') {
$x = 28;
$y = 125;
$sealx = 590;
$sealy = 425;
$sigx = 130;
示例13: Footer
}
}
function Footer()
{
//Position at 1.5 cm from bottom
$this->SetY(-15);
//Arial italic 8
$this->SetFont('Arial', 'I', 8);
//Page number
$this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');
}
}
$pdf = new PDF('L');
$pdf->AliasNbPages();
$pdf->SetAuthor("imranzahid+nexexcel@gmail.com");
$pdf->SetSubject("Route Wise Sales");
$pdf->SetTitle("Route Wise Sales");
$pdf->SetCreator("Imran Zahid");
$title = "Route Wise Sales";
foreach ($_GET['route'] as $route) {
$data = array();
$ndata = array();
$result = $mysqli->query("SELECT CONCAT(code, ' - ', description) name FROM sys_codes WHERE sys_codes_ref_id = {$route}");
$row = $result->fetch_assoc();
$routeName = $row['name'];
$data["{$route}"] = array();
$data["{$route}"]['name'] = $routeName;
$data["{$route}"]['weeks'] = array();
$result = $mysqli->query("SELECT p.party_code, p.party_name FROM party p WHERE p.company_ref_id = {$_SESSION['company_id']} AND p.route_no = {$route} ORDER BY p.party_name");
$parties = array();
while ($row = $result->fetch_assoc()) {
示例14: printTitle
function printTitle()
{
global $_title;
//Title
$this->SetFont('Arial', 'B', 8);
$this->Cell(0, 4, $_title, 0, 1, 'C');
$this->Ln(1);
}
function Footer()
{
}
}
$pdf = new PDF('P', 'mm', 'MA5');
$pdf->AliasNbPages();
$pdf->SetAuthor("imranzahid+nexexcel@gmail.com");
$pdf->SetSubject("Party Age");
$pdf->SetTitle("Party Age");
$pdf->SetCreator("Imran Zahid");
$prop = array('HeaderColor' => array(0, 0, 0), 'HeaderTextColor' => array(255, 255, 255), 'color1' => array(217, 217, 217), 'color2' => array(255, 255, 255), 'textcolor1' => array(0, 0, 0), 'textcolor2' => array(0, 0, 0), 'padding' => 1, 'formatNumber' => true, 'font' => array('Arial', '', 8), 'thfont' => array('Arial', 'B', 8));
if ($_GET['format'] == 'compact') {
$pdf->AddPage();
$pdf->AddCol('party', '28%', 'Party Name', 'L');
$pdf->AddCol('payt', '8%', 'Pay Terms', 'R');
$pdf->AddCol('days', '7%', 'Days', 'R');
$pdf->AddCol("d0", '9.5%', '0-30', 'R');
$pdf->AddCol("d30", '9.5%', '31-60', 'R');
$pdf->AddCol("d60", '9.5%', '61-90', 'R');
$pdf->AddCol("d90", '9.5%', '91-120', 'R');
$pdf->AddCol("d120", '9.5%', '>120', 'R');
$pdf->AddCol('total', '9.5%', 'Total', 'R');
$pdf->Table($ndata, $prop);
示例15: Footer
parent::Header();
}
function Footer()
{
//Position at 1.5 cm from bottom
$this->SetY(-15);
//Arial italic 8
$this->SetFont('Arial', 'I', 8);
//Page number
$this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');
}
}
$pdf = new PDF('L');
$pdf->AliasNbPages();
$pdf->SetAuthor("imranzahid+nexexcel@gmail.com");
$pdf->SetSubject("Monthly Expenses");
$pdf->SetTitle("Monthly Expenses");
$pdf->SetCreator("Imran Zahid");
$prop = array('color1' => array(255, 255, 255), 'color2' => array(255, 255, 255), 'color3' => array(128, 128, 128), 'padding' => 1, 'font' => array('Arial', '', 10), 'thfont' => array('Arial', 'B', 10), 'width' => $pdf->w - $pdf->lMargin - $pdf->rMargin);
$pdf->AddPage();
$pdf->AddCol('sno', getWidth(3, $prop['width']), 'S#', 'C');
$pdf->AddCol('account_name', getWidth(18, $prop['width']), 'Account Name', 'L');
$pdf->AddCol('total', getWidth(7, $prop['width']), 'Total', 'R');
$pdf->AddCol("jan", getWidth(6, $prop['width']), 'JAN', 'R');
$pdf->AddCol("feb", getWidth(6, $prop['width']), 'FEB', 'R');
$pdf->AddCol("mar", getWidth(6, $prop['width']), 'MAR', 'R');
$pdf->AddCol("apr", getWidth(6, $prop['width']), 'APR', 'R');
$pdf->AddCol("may", getWidth(6, $prop['width']), 'MAY', 'R');
$pdf->AddCol("jun", getWidth(6, $prop['width']), 'JUN', 'R');
$pdf->AddCol("jul", getWidth(6, $prop['width']), 'JUL', 'R');
$pdf->AddCol("aug", getWidth(6, $prop['width']), 'AUG', 'R');