当前位置: 首页>>代码示例>>PHP>>正文


PHP FPDF::SetAutoPageBreak方法代码示例

本文整理汇总了PHP中FPDF::SetAutoPageBreak方法的典型用法代码示例。如果您正苦于以下问题:PHP FPDF::SetAutoPageBreak方法的具体用法?PHP FPDF::SetAutoPageBreak怎么用?PHP FPDF::SetAutoPageBreak使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FPDF的用法示例。


在下文中一共展示了FPDF::SetAutoPageBreak方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: post_id_upc_terms_handler

 public function post_id_upc_terms_handler()
 {
     $this->id = preg_split('/[^\\d]/', $this->id, 0, PREG_SPLIT_NO_EMPTY);
     $pdf = new FPDF('P', 'mm', 'Letter');
     $pdf->SetMargins(6.35, 6.35, 6.35);
     // quarter-inch margins
     $pdf->SetAutoPageBreak(false);
     $pdf->AddFont('Gill', '', 'GillSansMTPro-Medium.php');
     $pdf->AddFont('Gill', 'B', 'GillSansMTPro-Heavy.php');
     $margins = $pdf->GetMargins();
     $margins['top'] = 0.0;
     $check_left_x = $margins['left'] > 3.175 ? $margins['right'] : 3.175 - $margins['left'];
     $real_check_top_y = 183.675 - $margins['top'];
     $check_right_x = 203.2 - $margins['left'];
     $real_check_bottom_y = 255.112 - $margins['top'];
     $line_height = 5;
     $envelope_window_tab = 15;
     $right_col1 = 130;
     $right_col2 = 170;
     $my_address = array('610 E 4th St', 'Duluth, MN 55805', 'Tel: 218.728.0884', 'www.wholefoods.coop');
     $check_date = date('F j, Y');
     $dbc = $this->connection;
     $dbc->setDefaultDB($this->config->get('OP_DB'));
     $signage = new COREPOS\Fannie\API\item\FannieSignage(array());
     foreach ($this->id as $card_no) {
         $pdf->AddPage();
         $account = \COREPOS\Fannie\API\member\MemberREST::get($card_no);
         $primary = array();
         foreach ($account['customers'] as $c) {
             if ($c['accountHolder']) {
                 $primary = $c;
                 break;
             }
         }
         $check_number = rand(100000, 999995);
         for ($i = 0; $i < 3; $i++) {
             $pdf->SetFont('Gill', '', 10);
             $check_top_y = $real_check_top_y - $i * 90;
             $check_bottom_y = $real_check_bottom_y - $i * 90;
             $pdf->SetXY($check_left_x, $check_top_y);
             $pdf->Ln($line_height * 4.25);
             foreach ($my_address as $line) {
                 $pdf->SetX($check_left_x + $envelope_window_tab + 20);
                 if ($line == 'www.wholefoods.coop') {
                     $pdf->SetFont('Gill', 'B', 9);
                 }
                 $pdf->Cell(0, $line_height, $line, 0, 1);
             }
             $pdf->SetFont('Gill', 'B', 10);
             $pdf->SetXY($check_left_x + $right_col1, $check_top_y);
             $pdf->Cell(30, $line_height, 'Check Number:', 0, 0, 'R');
             $pdf->SetFont('Gill', '', 10);
             $pdf->SetTextColor(0xff, 0x58, 0);
             $pdf->SetX($check_left_x + $right_col2);
             $pdf->Cell(30, $line_height, $check_number, 0, 0, 'R');
             $pdf->SetFont('Gill', 'B', 10);
             $pdf->SetTextColor(0, 0, 0);
             $pdf->SetXY($check_left_x + $right_col1, $check_top_y + 1.5 * $line_height);
             $pdf->Cell(30, $line_height, 'Date:', 0, 0, 'R');
             $pdf->SetFont('Gill', '', 10);
             $pdf->SetTextColor(0xff, 0x58, 0);
             $pdf->SetX($check_left_x + $right_col2);
             $pdf->Cell(30, $line_height, $check_date, 0, 0, 'R');
             $pdf->SetXY($check_left_x + $right_col1, $check_top_y + 3 * $line_height);
             $pdf->SetFont('Gill', 'B', 10);
             $pdf->SetTextColor(0, 0, 0);
             $pdf->Cell(30, $line_height, 'Amount:', 0, 0, 'R');
             $pdf->SetXY($check_left_x + $right_col1 + 30, $check_top_y + 3 * $line_height);
             $pdf->SetFont('Gill', '', 10);
             $pdf->SetTextColor(0xff, 0x58, 0);
             $pdf->MultiCell(40, $line_height, str_repeat(' ', 2) . $this->terms, 0, 'R');
             $pdf->SetTextColor(0, 0, 0);
             $their_address = array($primary['firstName'] . ' ' . $primary['lastName']);
             $their_address[] = $account['addressFirstLine'];
             if ($account['addressSecondLine']) {
                 $their_address[] = $account['addressSecondLine'];
             }
             $their_address[] = $account['city'] . ', ' . $account['state'] . ' ' . $account['zip'];
             $pdf->SetXY($check_left_x + $envelope_window_tab, $check_top_y + 11 * $line_height);
             $pdf->SetFont('Gill', 'B', 10);
             foreach ($their_address as $line) {
                 $pdf->SetX($check_left_x + $envelope_window_tab);
                 $pdf->Cell(0, $line_height, $line, 0, 1);
             }
             $pdf->SetFont('Gill', '', 10);
             $pdf->SetXY($check_left_x, $check_bottom_y + $line_height - 1);
             $pdf->SetTextColor(0, 0, 0);
             $pdf->SetFont('Gill', 'B', 10);
             $pdf->Cell(0, $line_height, 'Redeemable only at Whole Foods Co-op', 0, 0, 'C');
             $pdf->SetFont('Gill', '', 10);
             $pdf->SetXY($check_left_x + 145, $check_top_y + 6 * $line_height + 1);
             $pdf->SetFont('Gill', '', 8);
             $pdf->MultiCell(50, $line_height - 2, 'Limit one per day. Cannot be applied to previous purchases. No cash value.');
             $pdf->SetFont('Gill', '', 10);
             $pdf->SetFillColor(0xcc, 0xcc, 0xcc);
             $pdf->Rect($check_left_x + 84, $check_top_y + 28, 39, 15, 'F');
             $pdf->SetFillColor(0, 0, 0);
             $signage->drawBarcode(ltrim($this->upc, '0'), $pdf, $check_left_x + 87, $check_top_y + 30, array('height' => 11, 'fontsize' => 0));
             $pdf->Image('logo.rgb.noalpha.png', $check_left_x + $envelope_window_tab, $check_top_y + 20, 20);
             $pdf->SetFont('Gill', 'B', '31');
//.........这里部分代码省略.........
开发者ID:phpsmith,项目名称:IS4C,代码行数:101,代码来源:CheckCouponMailing.php

示例2: preprocess

 function preprocess()
 {
     if (FormLib::get_form_value('start', False) !== False) {
         $pdf = new FPDF('P', 'in', 'Letter');
         $pdf->SetMargins(0.5, 0.5, 0.5);
         $pdf->SetAutoPageBreak(False, 0.5);
         $pdf->AddPage();
         $start = FormLib::get_form_value('start');
         $x = 0.5;
         $y = 0.5;
         $pdf->AddFont('Gill', '', 'GillSansMTPro-Medium.php');
         $pdf->SetFont('Gill', '', 16);
         for ($i = 0; $i < 40; $i++) {
             $current = $start + $i;
             $pdf->SetXY($x, $y);
             $pdf->Cell(1.75, 0.5, $current, 0, 0, 'C');
             $pdf->Cell(1.75, 0.5, $current, 0, 0, 'C');
             if ($i % 2 == 0) {
                 $x += 1.75 * 2 + 0.5;
             } else {
                 $x = 0.5;
                 $y += 0.5;
             }
         }
         $pdf->Close();
         $pdf->Output("mem stickers {$start}.pdf", "I");
         return False;
     }
     return True;
 }
开发者ID:phpsmith,项目名称:IS4C,代码行数:30,代码来源:MemberStickerPage.php

示例3: drawPDF

 public function drawPDF()
 {
     $pdf = new \FPDF('L', 'mm', 'Letter');
     $pdf->SetMargins(3.175, 3.175, 3.175);
     $pdf->SetAutoPageBreak(false);
     if (\COREPOS\Fannie\API\FanniePlugin::isEnabled('CoopDealsSigns')) {
         $this->font = 'Gill';
         $this->alt_font = 'GillBook';
         define('FPDF_FONTPATH', dirname(__FILE__) . '/../../../modules/plugins2.0/CoopDealsSigns/noauto/fonts/');
         $pdf->AddFont('Gill', '', 'GillSansMTPro-Medium.php');
     }
     $pdf->SetFont($this->font, '', 16);
     $data = $this->loadItems();
     $width = 136.52;
     $height = 105;
     $top = 90;
     $left = 15;
     $effective_width = $width - 2 * $left;
     foreach ($data as $item) {
         $pdf->AddPage();
         $column = 1;
         // right aligned
         $price = $this->printablePrice($item);
         $pdf->SetXY($left + $width * $column, $top);
         $pdf->SetFontSize($this->SMALL_FONT);
         $pdf->Cell($effective_width, 10, $item['brand'], 0, 1, 'C');
         $pdf->SetX($left + $width * $column);
         $pdf->SetFontSize($this->MED_FONT);
         $pdf->MultiCell($effective_width, 12, $item['description'], 0, 'C');
         $pdf->SetX($left + $width * $column);
         $pdf->SetFontSize($this->BIG_FONT);
         $pdf->Cell($effective_width, 25, $price, 0, 1, 'C');
         $y_pos = $pdf->GetY();
         if ($item['startDate'] != '' && $item['endDate'] != '') {
             // intl would be nice
             $datestr = $this->getDateString($item['startDate'], $item['endDate']);
             $pdf->SetXY($left + $width * $column, $top + ($height - 40));
             $pdf->SetFontSize($this->SMALL_FONT);
             $pdf->Cell($effective_width, 20, $datestr, 0, 1, 'R');
         }
         if ($item['originName'] != '') {
             $pdf->SetXY($left + $width * $column, $y_pos);
             $pdf->SetFontSize($this->SMALL_FONT);
             if (strlen($item['originName']) < 50) {
                 $pdf->Cell($effective_width, 20, $item['originName'], 0, 1, 'L');
             } else {
                 $pdf->Cell($effective_width, 20, $item['originShortName'], 0, 1, 'L');
             }
         }
     }
     $pdf->Output('WfcProdSingle.pdf', 'I');
 }
开发者ID:phpsmith,项目名称:IS4C,代码行数:52,代码来源:WfcProduceSingle.php

示例4: save

	/**
	 * Save PHPExcel to file
	 *
	 * @param 	string 		$pFileName
	 * @throws 	Exception
	 */
	public function save($pFilename = null) {
		// Open file
		global $cnf;
		$pFilename= $cnf['path']['Temp'] . $pFilename;

		$fileHandle = fopen($pFilename, 'w');
		if ($fileHandle === false) {
			throw new Exception("Could not open file $pFilename for writing.");
		}

		// Fetch sheets
		$sheets = array();
		if (is_null($this->_sheetIndex)) {
			$sheets = $this->_phpExcel->getAllSheets();
		} else {
			$sheets[] = $this->_phpExcel->getSheet($this->_sheetIndex);
		}

    	// PDF paper size
    	$paperSize = 'A4';

		// Create PDF
		$pdf = new FPDF('P', 'pt', $paperSize);

		// Loop all sheets
		foreach ($sheets as $sheet) {
	    	// PDF orientation
	    	$orientation = 'P';
	    	if ($sheet->getPageSetup()->getOrientation() == PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE) {
		    	$orientation = 'L';
	    	}

			// Start sheet
			$pdf->SetAutoPageBreak(true);
			$pdf->SetFont('Arial', '', 10);
			$pdf->AddPage($orientation);

	    	// Get worksheet dimension
	    	$dimension = explode(':', $sheet->calculateWorksheetDimension());
	    	$dimension[0] = PHPExcel_Cell::coordinateFromString($dimension[0]);
	    	$dimension[0][0] = PHPExcel_Cell::columnIndexFromString($dimension[0][0]) - 1;
	    	$dimension[1] = PHPExcel_Cell::coordinateFromString($dimension[1]);
	    	$dimension[1][0] = PHPExcel_Cell::columnIndexFromString($dimension[1][0]) - 1;

	    	// Calculate column widths
	    	$sheet->calculateColumnWidths();

	    	// Loop trough cells
	    	for ($row = $dimension[0][1]; $row <= $dimension[1][1]; $row++) {
	    		// Line height
	    		$lineHeight = 0;

	    		// Calulate line height
	    		for ($column = $dimension[0][0]; $column <= $dimension[1][0]; $column++) {
	    		    $rowDimension = $sheet->getRowDimension($row);
	    			$cellHeight = PHPExcel_Shared_Drawing::pixelsToPoints(
	    				PHPExcel_Shared_Drawing::cellDimensionToPixels($rowDimension->getRowHeight())
	    			);
	    			if ($cellHeight <= 0) {
		    			$cellHeight = PHPExcel_Shared_Drawing::pixelsToPoints(
		    				PHPExcel_Shared_Drawing::cellDimensionToPixels($sheet->getDefaultRowDimension()->getRowHeight())
		    			);
	    			}
	    			if ($cellHeight <= 0) {
	    				$cellHeight = $sheet->getStyleByColumnAndRow($column, $row)->getFont()->getSize();
	    			}
	    			if ($cellHeight > $lineHeight) {
	    				$lineHeight = $cellHeight;
	    			}
	    		}

	    		// Output values
	    		for ($column = $dimension[0][0]; $column <= $dimension[1][0]; $column++) {
	    			// Start with defaults...
	    			$pdf->SetFont('Arial', '', 10);
	    			$pdf->SetTextColor(0, 0, 0);
	    			$pdf->SetDrawColor(100, 100, 100);
	    			$pdf->SetFillColor(255, 255, 255);

			    	// Coordinates
			    	$startX = $pdf->GetX();
			    	$startY = $pdf->GetY();

	    			// Cell exists?
	    			$cellData = '';
	    			if ($sheet->cellExistsByColumnAndRow($column, $row)) {
	    				if ($sheet->getCellByColumnAndRow($column, $row)->getValue() instanceof PHPExcel_RichText) {
	    					$cellData = $sheet->getCellByColumnAndRow($column, $row)->getValue()->getPlainText();
	    				} else {
		    				if ($this->_preCalculateFormulas) {
		    					$cellData = PHPExcel_Style_NumberFormat::ToFormattedString(
		    						$sheet->getCellByColumnAndRow($column, $row)->getCalculatedValue(),
		    						$sheet->getstyle( $sheet->getCellByColumnAndRow($column, $row)->getCoordinate() )->getNumberFormat()->getFormatCode()
		    					);
//.........这里部分代码省略.........
开发者ID:Jtgadbois,项目名称:Pedadida,代码行数:101,代码来源:PDF.php

示例5: generatePDF

function generatePDF($print_id, $print_type = 1)
{
    include "config.php";
    require_once 'fpdf/fpdf.php';
    $db = go\DB\DB::create($db_params, 'mysql');
    $db->query('SET CHARACTER SET cp1251');
    $get_print = $db->query('SELECT `finish_number`, `valve_type_id` FROM {numbers} WHERE `print_id`=?', array($_GET['print_id']))->assoc();
    $get_print_info = $db->query('SELECT DISTINCT(`nm`.`order`) as `order`, `us`.`name` as `name`, `nm`.`print_id` as `print_id` FROM {numbers} `nm` LEFT JOIN {users} `us` ON (`nm`.`user_id` = `us`.`id`) WHERE `print_id`=?', array($_GET['print_id']))->row();
    define('FPDF_FONTPATH', 'fpdf/fonts');
    $pdf = new FPDF("L", "mm", array("88", "7"));
    $pdf->AddFont('Arial-BoldMT', 'B', 'arial_bold.php');
    $pdf->SetFont('Arial-BoldMT', 'B', 11);
    $pdf->SetTextColor(0);
    //Add info for this order
    $pdf->AddPage('L');
    $pdf->SetAutoPageBreak(false);
    $pdf->SetXY(0, 0);
    $pdf->Cell(43, 7, $get_print_info['name'], 0, 0, "C", 0);
    $pdf->Cell(4, 7, '', 0, 0, "C", 0);
    $pdf->Cell(43, 7, $get_print_info['order'], 0, 0, "C", 0);
    //End of add
    for ($i = 0; $i < count($get_print); $i++) {
        $pdf->AddPage('L');
        $pdf->SetAutoPageBreak(false);
        $pdf->SetXY(0, 0);
        $pdf->Cell(43, 7, 'Ser.: ' . $get_print[$i]['finish_number'], 0, 0, "C", 0);
        $pdf->Cell(4, 7, '', 0, 0, "C", 0);
        if ($i + $print_type < count($get_print)) {
            $pdf->Cell(43, 7, 'Ser.: ' . $get_print[$i + $print_type]['finish_number'], 0, 0, "C", 0);
        }
        $pdf->SetAutoPageBreak(false);
        $i += $print_type;
    }
    return $pdf->Output($get_print_info['print_id'] . '.pdf', 'I');
}
开发者ID:2618094,项目名称:serial_numbers,代码行数:35,代码来源:includes.php

示例6: post_id_handler

 public function post_id_handler()
 {
     if (!is_array($this->id)) {
         $this->id = array($this->id);
     }
     $today = date("F j, Y");
     $pdf = new FPDF('L', 'in', array(3.5, 5.0));
     $pdf->AddFont('Gill', '', 'GillSansMTPro-Medium.php');
     $primary = "";
     $pdf->SetAutoPageBreak(true, 0);
     $pdf->SetFont("Gill", "", 10);
     //Meat of the statement
     foreach ($this->id as $card_no) {
         $account = \COREPOS\Fannie\API\member\MemberREST::get($card_no);
         $pdf->AddPage();
         $pdf->SetXY(3.0, 1.45);
         foreach ($account['customers'] as $c) {
             if ($c['accountHolder']) {
                 $pdf->Cell(2, 0.25, $c['firstName'] . ' ' . $c['lastName'], "", 1, "L");
                 break;
             }
         }
         $pdf->SetX(3.0);
         $pdf->Cell(2, 0.25, $account['addressFirstLine'], "", 1, "L");
         if ($account['addressSecondLine']) {
             $pdf->SetX(3.0);
             $pdf->Cell(2, 0.25, $account['addressSecondLine'], "", 1, "L");
         }
         $pdf->SetX(3.0);
         $str = $account['city'] . ", " . $account['state'] . " " . $account['zip'];
         $pdf->Cell(2, 0.25, $str, "", 1, "L");
     }
     $pdf->Output('member postcards.pdf', 'D');
     return false;
 }
开发者ID:phpsmith,项目名称:IS4C,代码行数:35,代码来源:StatementsPluginPostCards.php

示例7: CetakLaporan

function CetakLaporan($prevtahun, $tahun, $nexttahun, $urutan, $gel)
{
    include_once "../fpdf.php";
    require_once "../phplot.php";
    $lbr = 190;
    $arrStatusAplikan = array();
    $s = "select * from statusaplikan where KodeID='" . KodeID . "' order by Urutan ASC";
    $r = _query($s);
    while ($w = _fetch_array($r)) {
        $arrStatusAplikan[] = $w['StatusAplikanID'];
    }
    $arrGelombang = array();
    getArrayGelombang($arrGelombang, $tahun);
    // Buat Graph dan dimasukkan ke file dulu
    $piepath = '../tmp/data_fakta_pmb_pie_graph.png';
    $barpath = '../tmp/data_fakta_pmb_bar_graph.png';
    BuatPieGraph($piepath, $prevtahun, $tahun, $urutan, $gel);
    BuatBarGraph($barpath, $prevtahun, $tahun, $arrStatusAplikan, $urutan, $gel);
    // *** Cetak ***
    $pdf = new FPDF('L', 'mm', 'A4');
    $pdf->SetAutoPageBreak(true, 5);
    $pdf->SetTitle("DATA & FAKTA PMB TAHUN AJARAN {$tahun}/{$nexttahun} GELOMBANG " . UbahKeRomawiLimit99($urutan));
    $pdf->AddPage('L');
    BuatHeaderLap($prevtahun, $tahun, $pdf);
    TampilkanIsinya($prevtahun, $tahun, $arrStatusAplikan, $arrGelombang, $pdf);
    TampilkanGraph($piepath, 30, 75, 96, 64, $pdf);
    TampilkanGraph($barpath, 185, 75, 96, 64, $pdf);
    TampilkanSumberInformasi(60, 145, $prevtahun, $tahun, $urutan, $gel, $pdf);
    TampilkanRatioPresenter(185, 145, $arrStatusAplikan, $tahun, $urutan, $gel, $pdf);
    $pdf->Output();
}
开发者ID:anggadjava,项目名称:sisfor,代码行数:31,代码来源:pmblap.faktapmb.php

示例8:

 function class_pdf_maker($orientation = 'P', $unit = 'in', $format = 'letter')
 {
     parent::FPDF($orientation, $unit, $format);
     parent::SetMargins(0, 0);
     parent::Open();
     parent::AddPage();
     parent::SetAutoPageBreak(FALSE);
 }
开发者ID:joelphilippage,项目名称:Library,代码行数:8,代码来源:pdf_maker.php

示例9: drawPDF

 public function drawPDF()
 {
     $pdf = new \FPDF('L', 'mm', 'Letter');
     $pdf->SetMargins(3.175, 3.175, 3.175);
     $pdf->SetAutoPageBreak(false);
     $pdf = $this->loadPluginFonts($pdf);
     $pdf->SetFont($this->font, '', 16);
     $data = $this->loadItems();
     $count = 0;
     $sign = 0;
     $width = 136.52;
     $height = 108;
     $top = 30;
     $left = 15;
     $effective_width = $width - 2 * $left;
     foreach ($data as $item) {
         if ($count % 4 == 0) {
             $pdf->AddPage();
             $sign = 0;
         }
         $row = floor($sign / 2);
         $column = $sign % 2;
         $price = $this->printablePrice($item);
         $pdf->SetXY($left + $width * $column, $top + $row * $height);
         $pdf->SetFont($this->font, 'B', $this->SMALL_FONT);
         $pdf->Cell($effective_width, 10, $item['brand'], 0, 1, 'C');
         $pdf->SetX($left + $width * $column);
         $pdf->SetFont($this->font, '', $this->MED_FONT);
         $item['description'] = str_replace("\r", '', $item['description']);
         $pdf->Cell($effective_width, 10, str_replace("\n", '', $item['description']), 0, 1, 'C');
         $pdf->SetX($left + $width * $column);
         $pdf->SetFont($this->alt_font, '', $this->SMALLER_FONT);
         $item['size'] = $this->formatSize($item['size'], $item);
         $pdf->Cell($effective_width, 6, $item['size'], 0, 1, 'C');
         $pdf->SetXY($left + $width * $column, $top + $row * $height + 35);
         $pdf->SetFont($this->font, '', $this->BIG_FONT);
         $pdf->Cell($effective_width, 20, $price, 0, 1, 'C');
         if ($item['startDate'] != '' && $item['endDate'] != '') {
             // intl would be nice
             $datestr = $this->getDateString($item['startDate'], $item['endDate']);
             $pdf->SetXY($left + $width * $column, $top + $height * $row + ($height - $top - 20));
             $pdf->SetFont($this->alt_font, '', $this->SMALLEST_FONT);
             $pdf->Cell($effective_width, 20, $datestr, 0, 1, 'R');
         }
         if ($item['originShortName'] != '' || isset($item['nonSalePrice'])) {
             $pdf->SetXY($left + $width * $column, $top + $height * $row + ($height - $top - 20));
             $pdf->SetFont($this->alt_font, '', $this->SMALLEST_FONT);
             $text = $item['originShortName'] != '' ? $item['originShortName'] : sprintf('Regular Price: $%.2f', $item['nonSalePrice']);
             $pdf->Cell($effective_width, 20, $text, 0, 1, 'L');
         }
         $count++;
         $sign++;
     }
     $pdf->Output('Signage4UpL.pdf', 'I');
 }
开发者ID:phpsmith,项目名称:IS4C,代码行数:55,代码来源:Signage4UpL.php

示例10: getPdf

 function getPdf($image)
 {
     require JPATH_SITE . "/components/com_flexpaper/fpdf/fpdf.php";
     $filePath = JPATH_SITE . "/components/com_flexpaper/output/certificate.pdf";
     $pdf = new FPDF('L', 'mm');
     $pdf->SetLeftMargin(0);
     $pdf->SetRightMargin(0);
     $pdf->SetTopMargin(0);
     $pdf->SetAutoPageBreak(false);
     $pdf->AddPage();
     $pdf->Image($image);
     $pdf_file = $pdf->Output($filePath, 'F');
     return $pdf_file;
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:14,代码来源:certificate.php

示例11: __construct

 /**
  * Constructor method
  * @param  $orientation Page orientation
  * @param  $format Page format
  * @author Pablo Dall'Oglio
  */
 public function __construct($orientation = 'P', $format = 'a4')
 {
     parent::__construct($orientation, 'pt', $format);
     $this->setLocale();
     parent::SetAutoPageBreak(true);
     parent::SetMargins(0, 0, 0);
     parent::SetCreator('Adianti Studio PDF Designer');
     // parent::SetTitle('Letter');
     // parent::SetKeywords('www.xyz.com.br');
     parent::SetFillColor(255, 255, 255);
     parent::Open();
     parent::AliasNbPages();
     parent::SetX(20);
     $this->replaces = array();
     $this->href = '';
     $this->anchors = array();
     $this->orientation = $orientation;
     $this->format = $format;
     parent::SetFont('Arial', '', 10 * 1.3);
 }
开发者ID:jhonleandres,项目名称:pecommerce,代码行数:26,代码来源:TPDFDesigner.class.php

示例12: get_id_pdf_handler

 public function get_id_pdf_handler()
 {
     global $FANNIE_ROOT;
     if (!class_exists('FPDF')) {
         include $FANNIE_ROOT . 'src/fpdf/fpdf.php';
         define('FPDF_FONTPATH', 'font/');
     }
     $this->get_id_handler();
     // load models
     $loan_info = GumLib::loanSchedule($this->loan);
     $pdf = new FPDF('P', 'mm', 'Letter');
     $pdf->SetMargins(6.35, 6.35, 6.35);
     // quarter-inch margins
     $pdf->SetAutoPageBreak(false);
     $pdf->AddPage();
     $pdf->SetXY(0, 0);
     $pdf->Image('img/letterhead.png', null, null, 203);
     // scale to 8"
     $pdf->SetFont('Arial', '', 8);
     $line_height = 3.5;
     $pdf->SetXY(6.35, 43);
     $text = 'Pursuant to the terms of your Promissory Note with WFC, below please find a check for the principal and, as applicable, compound interest due.   A statement showing the terms of your loan and annual compounding of the interest thereon is provided. If your loan was for more than 0.00% interest, also below is an IRS form 1099-INT to be included with your ' . date('Y') . ' federal tax filing.  If you have questions regarding this payment, please contact Financial Manager Dale Maiers (dmaiers@wholefoods.coop).  Thank you very much for your support.';
     $pdf->Write($line_height, $text);
     $col_width = 40.64;
     $col1 = 6.35 + $col_width;
     $col2 = $col1 + $col_width;
     $col3 = $col2 + $col_width;
     $col4 = $col3 + $col_width;
     $table_y = 60;
     $pdf->SetFont('Arial', 'BU', 8);
     $pdf->SetXY($col1, $table_y);
     $pdf->Cell($col_width, $line_height, 'Ending Period', 0, 0, 'C');
     $pdf->SetXY($col2, $table_y);
     $pdf->Cell($col_width, $line_height, 'Days', 0, 0, 'C');
     $pdf->SetXY($col3, $table_y);
     $pdf->Cell($col_width, $line_height, 'Interest', 0, 0, 'R');
     $pdf->SetXY($col4, $table_y);
     $pdf->Cell($col_width, $line_height, 'Closing Balance', 0, 0, 'R');
     $pdf->SetFont('Arial', '', 8);
     $i = 0;
     for ($i = 0; $i < count($loan_info['schedule']); $i++) {
         $line_y = $table_y + ($i + 1) * $line_height;
         $pdf->SetXY($col1, $line_y);
         $pdf->Cell($col_width, $line_height, $loan_info['schedule'][$i]['end_date'], 0, 0, 'C');
         $pdf->SetXY($col2, $line_y);
         $pdf->Cell($col_width, $line_height, $loan_info['schedule'][$i]['days'], 0, 0, 'C');
         $pdf->SetXY($col3, $line_y);
         $pdf->Cell($col_width, $line_height, number_format($loan_info['schedule'][$i]['interest'], 2), 0, 0, 'R');
         $pdf->SetXY($col4, $line_y);
         $pdf->Cell($col_width, $line_height, number_format($loan_info['schedule'][$i]['balance'], 2), 0, 0, 'R');
     }
     $last_y = $table_y + ($i + 1) * $line_height;
     $pdf->SetFont('Arial', 'B', 8);
     $pdf->SetXY($col1, $last_y);
     $pdf->Cell($col_width, $line_height, 'Total', 0, 0, 'C');
     $pdf->SetXY($col2, $last_y);
     $pdf->Cell($col_width, $line_height, number_format($this->loan->principal(), 2), 0, 0, 'R');
     $pdf->SetXY($col3, $last_y);
     $pdf->Cell($col_width, $line_height, number_format($loan_info['total_interest'], 2), 0, 0, 'R');
     $pdf->SetXY($col4, $last_y);
     $pdf->Cell($col_width, $line_height, number_format($loan_info['balance'], 2), 0, 0, 'R');
     $pdf->SetFont('Arial', '', 8);
     $pdf->SetXY(6.35, $table_y);
     $pdf->SetFont('Arial', 'B', 8);
     $pdf->Cell($col_width, $line_height, 'Loan Amount', 0, 1, 'C');
     $pdf->SetFont('Arial', '', 8);
     $pdf->Cell($col_width, $line_height, number_format($this->loan->principal(), 2), 0, 1, 'C');
     $pdf->SetFont('Arial', 'B', 8);
     $pdf->Cell($col_width, $line_height, 'Term', 0, 1, 'C');
     $pdf->SetFont('Arial', '', 8);
     $pdf->Cell($col_width, $line_height, $this->loan->termInMonths() / 12 . ' Years', 0, 1, 'C');
     $pdf->SetFont('Arial', 'B', 8);
     $pdf->Cell($col_width, $line_height, 'Loan Date', 0, 1, 'C');
     $pdf->SetFont('Arial', '', 8);
     $pdf->Cell($col_width, $line_height, date('m/d/Y', strtotime($this->loan->loanDate())), 0, 1, 'C');
     $pdf->SetFont('Arial', 'B', 8);
     $pdf->Cell($col_width, $line_height, 'Interest Rate', 0, 1, 'C');
     $pdf->SetFont('Arial', '', 8);
     $pdf->Cell($col_width, $line_height, 100 * $this->loan->interestRate() . '%', 0, 1, 'C');
     $pdf->SetFont('Arial', 'B', 8);
     $pdf->Cell($col_width, $line_height, 'Maturity Date', 0, 1, 'C');
     $pdf->SetFont('Arial', '', 8);
     $ld = strtotime($this->loan->loanDate());
     $ed = mktime(0, 0, 0, date('n', $ld) + $this->loan->termInMonths(), date('j', $ld), date('Y', $ld));
     $pdf->Cell($col_width, $line_height, date('m/d/Y', $ed), 0, 1, 'C');
     $pdf->SetDrawColor(0, 0, 0);
     $pdf->Line(6.35, $table_y, 6.35 + $col_width, $table_y);
     $pdf->Line(6.35, $table_y, 6.35, $table_y + 10 * $line_height);
     $pdf->Line(6.35 + $col_width, $table_y, 6.35 + $col_width, $table_y + 10 * $line_height);
     $pdf->Line(6.35, $table_y + 10 * $line_height, 6.35 + $col_width, $table_y + 10 * $line_height);
     for ($i = 2; $i <= 8; $i += 2) {
         $pdf->Line(6.35, $table_y + $i * $line_height, 6.35 + $col_width, $table_y + $i * $line_height);
     }
     $fields = array(1 => $loan_info['total_interest']);
     $this->settings->key('storeStateID');
     if ($this->settings->load()) {
         $fields[12] = $this->settings->value();
     }
     $this->settings->key('storeState');
     if ($this->settings->load()) {
//.........这里部分代码省略.........
开发者ID:phpsmith,项目名称:IS4C,代码行数:101,代码来源:GumLoanPayoffPage.php

示例13: create5160MailingLabelFile

 public function create5160MailingLabelFile($results, $name = "dummy_")
 {
     $name .= date("M_d_Y") . ".pdf";
     $fpdf = new FPDF();
     $fpdf->Open();
     $fpdf->AddPage();
     $fpdf->SetFont('Arial', 'B', 10);
     $fpdf->SetMargins(0, 0);
     $fpdf->SetAutoPageBreak(false);
     $x = 0;
     $y = 0;
     // create the array of the ids want to query the database for addresses
     foreach ($results as $student) {
         $st = new PSUPerson($student['spriden_id'], array('address'));
         $LabelText = sprintf("%s\n%s\n%s, %s, %s", $student['spriden_last_name'] . ", " . $student['spriden_first_name'] . " " . $student['spriden_mi'], $st->address['CA'][0]->street_line1, $st->address['CA'][0]->city, $st->address['CA'][0]->stat_code, $st->address['CA'][0]->zip);
         $this->Avery5160($x, $y, $fpdf, $LabelText);
         $y++;
         // next row
         if ($y == 10) {
             // end of page wrap to next column
             $x++;
             $y = 0;
             if ($x == 3) {
                 // end of page
                 $x = 0;
                 $y = 0;
                 $fpdf->AddPage();
             }
         }
         $st->destroy();
     }
     echo $fpdf->Output($name, $destination = 'd');
 }
开发者ID:AholibamaSI,项目名称:plymouth-webapp,代码行数:33,代码来源:ResLifeUtils.class.php

示例14: FPDF

<?php

require 'fpdf16/fpdf.php';
require 'connection.php';
validate_user();
$pdf = new FPDF();
$pdf->AliasNbPages();
$pdf->SetTopMargin(20);
$pdf->SetLeftMargin(45);
$pdf->SetAutoPageBreak(1, 0.5);
$pdf->SetDisplayMode(100);
$pdf->SetAutoPageBreak(true, 10);
$pdf->AddPage();
//$pdf->AddPage('L');
$pdf->SetDisplayMode(110, "single");
$pdf->SetTitle("Netherhall House");
$border = 0;
$pdf->SetFont('Arial', 'B', 10);
$pdf->SetFillColor(255, 255, 255);
$request = filter_input_array(INPUT_POST);
if ($request[name] != "") {
    $r = mysql_query("SELECT * FROM residents LEFT JOIN countries on residents.country_id = countries.country_id WHERE name LIKE '%{$request[name]}%' OR surname LIKE '%{$request[name]}%'");
} else {
    $today = date("Y", time()) . "-" . date("m", time()) . "-" . date("d", time());
    if (!isset($request[academic_year]) || $request[academic_year] == "current") {
        // >= 28 days = 4 weeks
        //$condition_search=" AND bookings.arrival <= '$today' AND bookings.departure >= '$today' AND DATEDIFF(bookings.departure,bookings.arrival) >= 28  ";
        // 06-Feb-2010 - They want to see all the residents in the current residents list. So I remove the condition about days.
        $condition_search = " AND bookings.arrival <= '{$today}' AND bookings.planned_departure >= '{$today}' ";
    } elseif ($request[academic_year] == "short") {
        // < 28 days = 4 weeks
开发者ID:albertcabre,项目名称:worldresidents,代码行数:31,代码来源:pdf_residents_pictures.php

示例15: FPDF

<?php

require_once 'class.einzahlungsschein.php';
require_once 'fpdf/fpdf.php';
$amount = "150.20";
//Create a new pdf to create your invoice, already using FPDF
//(if you don't understand this part you should have a look at the FPDF documentation)
$pdf = new FPDF('P', 'mm', 'A4');
$pdf->AddPage();
$pdf->SetAutoPageBreak(0, 0);
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(50, 4, "Example red Einzahlungsschein (see bottom of this pdf)");
//now simply include your Einzahlungsschein, sending your pdf instance to the Einzahlungsschein class
$ezs = new Einzahlungsschein(196, 0, $pdf);
$ezs->setType('red');
$ezs->setPaymentReason('Invoice 34345');
$ezs->setBankData("Berner Kantonalbank AG", "3001 Bern", "01-200000-7");
$ezs->setRecipientData("My Company Ltd.", "Exampleway 61", "3001 Bern", "CH100023000A109822346");
$ezs->setPayerData("Heinz Müller", "Beispielweg 23", "3072 Musterlingen");
$ezs->setPaymentData($amount);
$ezs->createEinzahlungsschein(false, true);
$pdf->output();
开发者ID:athanasius-kirchner,项目名称:class.Einzahlungsschein.php,代码行数:22,代码来源:example_red.php


注:本文中的FPDF::SetAutoPageBreak方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。