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


PHP FPDI::AddFont方法代码示例

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


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

示例1: generate_mitgliedsbescheinigung

function generate_mitgliedsbescheinigung($titleAndName, $strasse, $plz, $ort, $land, $jahr, $vorstand, $datum)
{
    // initiate FPDI
    $pdf = new FPDI();
    // add a page
    $pdf->AddPage();
    // set the source file
    $pdf->setSourceFile(HOME_DIRECTORY . 'alumpiHP_libraries/Mitgliedsbestaetigung_blank.pdf');
    // import page 1
    $tplIdx = $pdf->importPage(1);
    // use the imported page and place it at position 0,0 with a width of 210 mm (full page)
    $pdf->useTemplate($tplIdx, 0, 0, 210);
    // add the font DejaVu
    $pdf->AddFont('DejaVuSans', '', 'DejaVuSans.ttf', true);
    $pdf->AddFont('DejaVuSans-Bold', '', 'DejaVuSans-Bold.ttf', true);
    // text settings
    $pdf->SetTextColor(0, 0, 0);
    // add address of the member
    $addressString = $titleAndName . "\n";
    $addressString .= $strasse . "\n";
    $addressString .= $plz . " " . $ort . "\n";
    $addressString .= $land;
    $pdf->SetFont('DejaVuSans');
    $pdf->SetFontSize(12);
    $pdf->SetXY(20, 23);
    $pdf->Multicell(80, 6, $addressString);
    //add heading
    $headingString = "Mitgliedsbescheinigung " . $jahr;
    $pdf->SetFont('DejaVuSans-Bold');
    $pdf->SetFontSize(16);
    $pdf->SetXY(20, 80);
    $pdf->Multicell(170, 6, $headingString);
    // add main text
    $textString = "Hiermit wird bestätigt, dass " . $titleAndName . " im Kalenderjahr " . $jahr;
    $textString .= " ordentliches Mitglied des Absolventen- und Förderverein MPI Uni Bayreuth e.V. (aluMPI) ist.\n";
    $textString .= "\n";
    $pdf->SetFont('DejaVuSans');
    $pdf->SetFontSize(12);
    $pdf->SetXY(20, 100);
    $pdf->Multicell(170, 6, $textString);
    // add signature text
    $signatureString = "Absolventen- und Förderverein MPI Uni Bayreuth e.V.\n";
    $signatureString .= "1. Vorstand: " . $vorstand . "\n";
    $pdf->SetXY(20, 140);
    $pdf->Multicell(170, 6, $signatureString);
    // add signature
    $pdf->Image(HOME_DIRECTORY . 'alumpiHP_libraries/unterschrift_krinninger.png', 20, 155, 50);
    // add place and date
    $dateString = "Bayreuth, " . $datum;
    $pdf->SetXY(20, 180);
    $pdf->Multicell(170, 6, $dateString);
    ob_clean();
    $pdf->Output();
}
开发者ID:Beztix,项目名称:alumpi,代码行数:54,代码来源:generate_mitgliedsbescheinigung.php

示例2: die

}
if ($_SESSION['status'] == "admin") {
    $query = "SELECT * FROM `abiturients` WHERE `ab_id` = '" . $id . "'";
    $sql = mysql_query($query) or die(mysql_error());
    if (mysql_num_rows($sql) == 1) {
        $row = mysql_fetch_assoc($sql);
    }
}
$pdf = new FPDI();
$pageCount = $pdf->setSourceFile("img/ugoda2014.pdf");
$pageNo = 1;
$templateId = $pdf->importPage($pageNo);
$size = $pdf->getTemplateSize($templateId);
$pdf->AddPage('P', array($size['w'], $size['h']));
$pdf->useTemplate($templateId);
$pdf->AddFont('Times', '', 'times.php');
$pdf->SetFont('Times', '', 10);
$pdf->SetTextColor(0, 0, 0);
$pdf->SetFontSize(11);
$pdf->SetXY(35, 61);
$pdf->Write(5, $row['lastname'] . " " . $row['firstname'] . " " . $row['patronymic']);
$pdf->SetXY(55, 70);
if ($row['type'] == "mag") {
    $pdf->Write(5, "6-й курс, " . $row['faculty']);
}
if ($row['type'] == "spc") {
    $pdf->Write(5, "5-й курс " . $row['faculty']);
}
if ($row['study_type'] == "Денна") {
    $type = ", денна форма навчання";
}
开发者ID:AlexSlovinskiy,项目名称:magistr.zu.edu.ua,代码行数:31,代码来源:PatternGenAgreement.php

示例3: view_sign_oc

	public function view_sign_oc(){
		require_once('./assets/fpdf17/fpdf.php');
		require_once('./assets/fpdf17/fpdi.php');
		$oc_id=$this->uri->segment(3,'');
		
		// init pce data                       
		$oc_dat=$this->m_oc->get_oc_by_id($oc_id);
		$project=$this->m_project->get_project_by_id($oc_dat->project_id);
        //init sign pic
        $ae_sign_user_dat=$this->m_user->get_user_by_login_name($project->project_cs);
        $ae_sign_filename="no";
        if (isset($ae_sign_user_dat->sign_filename)) {
          $ae_sign_filename=$ae_sign_user_dat->sign_filename;
        }
        $finance_sign_dat=$this->m_user->get_user_by_login_name($oc_dat->fc_sign);
        $finance_sign_filename="no";
        if (isset($finance_sign_dat->sign_filename)) {
          $finance_sign_filename=$finance_sign_dat->sign_filename;
        }
        // initiate FPDI
        $pdf = new FPDI();

        // เพิ่มฟอนต์ภาษาไทยเข้ามา ตัวธรรมดา กำหนด ชื่อ เป็น angsana
            $pdf->AddFont('angsana','','angsa.php');
             
            // เพิ่มฟอนต์ภาษาไทยเข้ามา ตัวหนา  กำหนด ชื่อ เป็น angsana
            $pdf->AddFont('angsana','B','angsab.php');
             
            // เพิ่มฟอนต์ภาษาไทยเข้ามา ตัวหนา  กำหนด ชื่อ เป็น angsana
            $pdf->AddFont('angsana','I','angsai.php');
             
            // เพิ่มฟอนต์ภาษาไทยเข้ามา ตัวหนา  กำหนด ชื่อ เป็น angsana
            $pdf->AddFont('angsana','BI','angsaz.php');


        // get the page count
        $pageCount = $pdf->setSourceFile("./media/real_pdf/".$oc_dat->filename);
        // iterate through all pages
        for ($pageNo = 1; $pageNo <= $pageCount; $pageNo++) {
            // import a page
            $templateId = $pdf->importPage($pageNo);
            // get the size of the imported page
            $size = $pdf->getTemplateSize($templateId);

            // create a page (landscape or portrait depending on the imported page size)
            if ($size['w'] > $size['h']) {
                $pdf->AddPage('L', array($size['w'], $size['h']));
            } else {
                $pdf->AddPage('P', array($size['w'], $size['h']));
            }

            // use the imported page
            $pdf->useTemplate($templateId);

            $pdf->SetTextColor(0,0,0);
            $pdf->SetFont('angsana','B',14);
            $pdf->SetXY(5, 5);
            //$pdf->Write(8, 'A complete document imported with FPDI');

            //// temporaly disable 
            if ($finance_sign_filename!="no"&&$finance_sign_filename!=""&&$finance_sign_filename!=null) {
              //$pdf->Image("./media/sign_photo/".$finance_sign_filename,100,10,40,0);
            }
            if ($ae_sign_filename!="no"&&$ae_sign_filename!=""&&$ae_sign_filename!=null) {
              //$pdf->Image("./media/sign_photo/".$ae_sign_filename,100,110,40,0);
            }
            //$pdf->Image("images/play.png",100,100,100,0);
        }
        $new_filename=$oc_dat->oc_no."_A.pdf";

        // Output the new PDF
        //@unlink("./media/real_pdf/".$new_filename);
        $pdf->Output($new_filename,"I");
        //redirect("media/real_pdf/".$new_filename);
	}
开发者ID:sereepap2029,项目名称:rcal,代码行数:75,代码来源:project.php

示例4: write_instruction


//.........这里部分代码省略.........
    if (empty($data[$rec_ind][25])) {
        $ing14 = "";
    } else {
        $ing14 = $bul . " " . $data[$rec_ind][25];
    }
    if (empty($data[$rec_ind][26])) {
        $ing15 = "";
    } else {
        $ing15 = $bul . " " . $data[$rec_ind][26];
    }
    if (empty($data[$rec_ind][27])) {
        $ing16 = "";
    } else {
        $ing16 = $bul . " " . $data[$rec_ind][27];
    }
    if (empty($data[$rec_ind][28])) {
        $ing17 = "";
    } else {
        $ing17 = $bul . " " . $data[$rec_ind][28];
    }
    if (empty($data[$rec_ind][29])) {
        $ing18 = "";
    } else {
        $ing18 = $bul . " " . $data[$rec_ind][29];
    }
    // Initiate FPDI & FPDF
    $pdf = new FPDI();
    $pdf->setSourceFile("extract_template.pdf");
    // Create page 1 & Read Template Page 1
    $pdf->AddPage('P', 'Letter');
    $tmp = $pdf->importPage(1);
    $pdf->useTemplate($tmp, 0, 0);
    // Declare Fonts
    $pdf->AddFont('Kenyancoffee', '', 'Kenyancoffeerg.php');
    $pdf->AddFont('Roboto', '', 'Roboto-Regular.php');
    $pdf->AddFont('Roboto', 'L', 'Roboto-Light.php');
    $pdf->AddFont('Roboto', 'B', 'Roboto-Bold.php');
    // Write Dynamic Data - Header
    $pdf->SetFont('Kenyancoffee', '', 23);
    $pdf->SetTextColor(229, 80, 84);
    $pdf->SetXY(57.3, 19);
    $pdf->Cell(0, 0, $recipe);
    $pdf->SetFont('Roboto', 'L', 9.9);
    $pdf->SetTextColor(0, 0, 0);
    $pdf->SetXY(57.3, 25.5);
    $pdf->Cell(0, 0, $style);
    $pdf->SetFont('Roboto', 'L', 9.9);
    $pdf->SetTextColor(0, 0, 0);
    $pdf->SetXY(65.2, 36.2);
    $pdf->Cell(0, 0, $og);
    $pdf->SetFont('Roboto', 'L', 9.9);
    $pdf->SetTextColor(0, 0, 0);
    $pdf->SetXY(85.2, 36.2);
    $pdf->Cell(0, 0, $fg);
    $pdf->SetFont('Roboto', 'L', 9.9);
    $pdf->SetTextColor(0, 0, 0);
    $pdf->SetXY(108.5, 36.2);
    $pdf->Cell(0, 0, $abv);
    // Write Dynamic Data - Ingredients
    $pdf->SetFont('Roboto', 'B', 7.5);
    $pdf->SetTextColor(255, 255, 255);
    $pdf->SetXY(5.3, 156.5);
    $pdf->Cell(0, 0, $ing1);
    $pdf->SetFont('Roboto', 'B', 7.5);
    $pdf->SetTextColor(255, 255, 255);
    $pdf->SetXY(5.3, 161.5);
开发者ID:ttanton,项目名称:dynamic-recipes,代码行数:67,代码来源:instr_ex.php

示例5: FPDI

 class FPDF extends tFPDF
 {
     protected $_tplIdx;
 }
 $pdf = new FPDI();
 if ($user->getPrivilege() <= 10) {
     $source = "docs/certificatelead.pdf";
 } else {
     $source = "docs/certificate.pdf";
 }
 $pagecount = $pdf->setSourceFile($source);
 $tplidx = $pdf->importPage(1);
 $pdf->addPage('L');
 $pdf->useTemplate($tplidx, 0, 0, 0);
 $date = date('jS F Y');
 $pdf->AddFont('DejaVu', '', 'DejaVuSansCondensed.ttf', true);
 $pdf->SetFont('DejaVu', '', 30);
 $pdf->SetTextColor(0, 0, 0);
 $pdf->SetXY(0, 95);
 $pdf->Cell(297, 15, $name, 0, 0, 'C', 0);
 $pdf->SetFont('Arial', '', 18);
 $pdf->SetXY(170, 160);
 $pdf->Write(0, $date);
 $attachment = $pdf->output('Certificate.pdf', 'S');
 header('Pragma: public');
 header('Expires: -1');
 header('Content-Transfer-Encoding: binary');
 header('Content-Type: application/pdf');
 header('Content-Disposition: attachment;filename="ISOS%20Certificate.pdf"');
 header('Cache-Control: max-age=0');
 // output the file
开发者ID:uhtoff,项目名称:eCRF,代码行数:31,代码来源:process.php

示例6: unserialize

}
$contract_data = mysql_fetch_assoc(mysql_query($query));
//Получаем данные страхователя
$insurer_data = mysql_fetch_assoc(mysql_query("SELECT * FROM `" . ($contract_data["insurer_type"] == 1 ? "contact_phiz" : "contact_jur") . "` WHERE `id` = '" . $contract_data["insurer_id"] . "'"));
$owner_data = mysql_fetch_assoc(mysql_query("SELECT * FROM `" . ($contract_data["owner_type"] == 1 ? "contact_phiz" : "contact_jur") . "` WHERE `id` = '" . $contract_data["owner_id"] . "'"));
$vehicle_data = unserialize($contract_data['vehicle_data']);
$step_2_data = preg_replace('!s:(\\d+):"(.*?)";!e', "'s:'.strlen('\$2').':\"\$2\";'", $contract_data['step_2_data']);
//боримся с проблемой unserialize если есть кавычки
$step_2_data = unserialize($step_2_data);
$calc_data = unserialize($contract_data['calc_data']);
$calc_result = unserialize($contract_data['calc_result']);
require_once 'fpdf17/fpdf.php';
require_once 'fpdi/fpdi.php';
//Вносим необходимые данные в полис и отдаём в формате pdf
$pdf = new FPDI();
$pdf->AddFont('ArialMT', '', 'arial_cyr.php');
$pdf->AddFont('Arial-BoldMT', '', 'arialbold.php');
$pdf->AddPage();
// $pdf->setSourceFile('blank/bso3.pdf');
// // Указываем номер импортируемой страницы
// $tplIdx = $pdf->importPage(1);
// //указываем размер страницы
// //$pdf->useTemplate($tplIdx, 0, 0, 210, 297, true);
// $pdf->useTemplate($tplIdx, 0, 0, 210, 297, true);
//Ставим поля по нулям
$pdf->SetMargins(0, 0, 0, 0);
$pdf->SetAutoPageBreak(false);
//указываем шрифт и размер
$pdf->SetFont('Arial-BoldMT', '', '13');
//указываем цвет текста
$pdf->SetTextColor(0, 0, 0);
开发者ID:pinicilin2006,项目名称:osago,代码行数:31,代码来源:bso.php

示例7: die

$file = __DIR__ . '/cupon_001.pdf';
if (!file_exists($file)) {
    die("File does not exist");
} else {
    $fullName = $_REQUEST['suname'] . ' ' . $_REQUEST['name'] . ' ' . $_REQUEST['midlname'];
    $currentDate = currentDate();
    $cuponNum = generateCuponNumber();
    sendEmail($cuponNum, $currentDate, $fullName);
    $pdf = new FPDI();
    $pdf->setSourceFile($file);
    $tpl = $pdf->importPage(1);
    $size = $pdf->getTemplateSize($tpl);
    $orientation = $size['h'] > $size['w'] ? 'P' : 'L';
    $pdf->AddPage($orientation);
    $pdf->useTemplate($tpl, null, null, $size['w'], $size['h'], true);
    $pdf->AddFont('AgencyFBCyrillic', '', 'agenfbcyr.php');
    $pdf->AddFont('GoodVibesPro', '', 'good_vibes_pro_regular.php');
    $pdf->SetXY(41.628, 91.017);
    $pdf->SetFont('GoodVibesPro', '', 40);
    $pdf->SetTextColor(184, 153, 106);
    $pdf->Cell(212.019, 20.814, iconv('UTF-8', 'CP1251', $fullName), 0, 2, 'C');
    $pdf->SetXY(56.797, 160.396);
    $pdf->SetFont('AgencyFBCyrillic', '', 21);
    $pdf->SetTextColor(32, 22, 0);
    $pdf->Cell(44.097, 7.173, iconv('UTF-8', 'CP1251', $currentDate), 0, 2, 'C');
    $pdf->SetXY(194.263, 160.396);
    $pdf->SetFont('AgencyFBCyrillic', '', 21);
    $pdf->SetTextColor(32, 22, 0);
    $pdf->Cell(44.332, 7.173, iconv('UTF-8', 'CP1251', $cuponNum), 0, 2, 'C');
    $pdf->Output('Your_Cupon.pdf', 'D');
}
开发者ID:teplizy,项目名称:teplizy.github.io,代码行数:31,代码来源:index.php

示例8: FPDI

// just require FPDI afterwards
require_once './FPDI-1.4.4/fpdi.php';
// Page in is in mm -- 215.9 wide, by 279.4 = 8.5 x 11 inches
// initiate PDF
$pdf = new FPDI("P", "mm", "letter");
// Shortcut so we don't have to write $this_border so much;
$b = $pdf->border;
// Set page break distance from bottom
$pdf->SetAutoPageBreak(false, 30);
// Load the dynamic content from the post
$content = json_decode(utf8_encode($_POST['content']));
$pdf->content = $content;
// Note - Don't add all the fonts.  They all get embedded in the PDF wether you use them or not.
// Add some Unicode font (uses UTF-8)
// Hairline
$pdf->AddFont('Lato-100', '', 'Lato-Hai.ttf', true);
// Regular
$pdf->AddFont('Lato', '', 'Lato-Lig.ttf', true);
// Bold
$pdf->AddFont('Lato', 'B', 'Lato-Reg.ttf', true);
// Really Bold
$pdf->AddFont('Lato-700', '', 'Lato-Bol.ttf', true);
//
$pdf->SetFont('Lato', '', 10);
$pdf->AddPage("portrait", "letter");
$font["h4"] = 16;
$font["h3"] = 20;
$font["h2"] = 17;
$font["h1"] = 19.5;
$font["legend"] = 12;
$font["label"] = array(9, 10, 12);
开发者ID:jaret123,项目名称:frontend,代码行数:31,代码来源:index.php

示例9: FlyerRendering


//.........这里部分代码省略.........
    //mm
    $kontaktFooterWidth = $wMitte;
    //mm
    $kontaktFooterFontSize = 10.9;
    //pt
    echo "\n";
    // Output-Dasteiname zusammenbauen
    $outputFile = $outputPostfix . "-" . $inputFile;
    // initiate FPDI
    $pdf = new FPDI();
    echo "Input: {$inputFile}\n";
    $pageCount = $pdf->setSourceFile($inputFile);
    // Importiere Vorder- und Rueckseite
    $Vorderseite = $pdf->ImportPage(1);
    $Rueckseite = $pdf->ImportPage(2);
    // Seitenabmessungen holen
    $size = $pdf->getTemplateSize($Vorderseite);
    $dokumentBreite = round($size['w'], 2);
    $dokumentHoehe = round($size['h'], 2);
    echo "Dokumenten Breite: {$dokumentBreite} mm\n";
    echo "Dokumenten Hoehe: {$dokumentHoehe} mm\n";
    echo "Anschnitt: {$anschnitt} mm\n";
    // Vorderseite uebernehmen
    // Anfang eines bloeden Hacks wegen des FooterZeilen-Textes.
    // Der Footertext laesst sich nur einfügen, wenn die Seite eine A4 Seite ist.
    // Keine Ahnung warum!
    $pdf->AddPage('L');
    $tplVorderseite = $pdf->importPage(1);
    $pdf->useTemplate($tplVorderseite);
    //Margin ist wegen der Rand-Platzierung des Community Names wichtig.
    $pdf->SetMargins(0, 0, 0);
    // erstmal alle Fonts laden
    echo "Lade Fonts...\n";
    $pdf->AddFont('lato-bold');
    $pdf->AddFont('lato-regular');
    $pdf->AddFont('alternategothic');
    // Rendern Titel Text
    echo "Verarbeite Titel Text...\n";
    $pdf->SetFont('lato-bold');
    $pdf->SetFontSize($kontaktTitelFontSize);
    $pdf->SetTextColor(0, 0, 0);
    //schwarz
    $pdf->SetXY($kontaktTitelPositionX + $anschnitt, $kontaktTitelPositionY + $anschnitt);
    $pdf->Write(0, iconv('UTF-8', 'windows-1252', $kontaktTitelText));
    // Rendern Info Text
    echo "Verarbeite Info Text...\n";
    $pdf->SetTextColor(0, 0, 0);
    //schwarz
    $pdf->SetFontSize($kontaktInfoFontSize);
    foreach ($kontaktInfoTexte as $a) {
        $pdf->SetFont('lato-bold');
        $pdf->SetXY($kontaktTitelPositionX + $anschnitt, $kontaktInfoPositionY + $anschnitt);
        $pdf->Write(0, iconv('UTF-8', 'windows-1252', $a[0]));
        $pdf->SetFont('lato-regular');
        $pdf->SetXY($kontaktInfoTextPositionX + $anschnitt, $kontaktInfoPositionY + $anschnitt);
        $pdf->Write(0, iconv('UTF-8', 'windows-1252', $a[1]));
        $kontaktInfoPositionY = $kontaktInfoPositionY + $kontaktInfoZeilenOffsetY;
    }
    // Rendern Community Logo
    echo "Verarbeite Logo...\n";
    $pdf->Image($kontaktLogoDateiName, $kontaktLogoPositionX + $anschnitt, $kontaktLogoPositionY + $anschnitt, $kontaktLogoWidth, 0);
    // Rendern Fusszeilen Text
    echo "Verarbeite Fusszeile...\n";
    $pdf->SetFont('lato-regular');
    $pdf->SetFontSize($kontaktFooterFontSize);
    $pdf->SetTextColor(255, 255, 255);
开发者ID:rubo77,项目名称:ffm-freifunk-faltblatt-6-seiten,代码行数:67,代码来源:flyermod.php

示例10: FlyerRendering

function FlyerRendering($config, $inputFile, $outputPath, $outputPostfix, $anschnitt = 0.0)
{
    // Breite der einzelnen Seiten
    $wRechts = 99.0;
    //mm
    $wMitte = 98.0;
    //mm
    $wLinks = 97.0;
    //mm
    // Community Name
    $communityNamePositionX = $wLinks + $wMitte + $config['communityNamePositionOffsetX'];
    //mm
    $communityNamePositionY = 12.2 + $config['communityNamePositionOffsetY'];
    //mm
    // Kontakt Titel
    $kontaktTitelPositionX = $wLinks + 3.975;
    //mm
    $kontaktTitelPositionY = 10.425;
    //mm
    $kontaktTitelFontSize = 15.0;
    //pt
    // Kontakt Info
    $kontaktInfoTextPositionX = $kontaktTitelPositionX + 25.0;
    //mm
    $kontaktInfoPositionY = $kontaktTitelPositionY + 7.0;
    //mm
    $kontaktInfoZeilenOffsetY = 4.7;
    //mm
    $kontaktInfoFontSize = 10.9;
    //pt
    // Kontakt Logo
    $kontaktLogoPositionX = $wLinks + $wMitte / 2 - $config['kontaktLogoWidth'] / 2;
    // Kontakt Footer
    $kontaktFooterPositionX = $wLinks;
    //mm
    $kontaktFooterPositionY = 95.40000000000001;
    //mm
    $kontaktFooterWidth = $wMitte;
    //mm
    $kontaktFooterFontSize = 10.9;
    //pt
    // Output-Dasteiname zusammenbauen
    $outputFile = $outputPath . DIRECTORY_SEPARATOR . $outputPostfix . '_' . basename($inputFile);
    // initiate FPDI
    $pdf = new FPDI();
    echo 'Input: ' . basename($inputFile) . PHP_EOL;
    $pageCount = $pdf->setSourceFile($inputFile);
    // Importiere Vorder- und Rueckseite
    $Vorderseite = $pdf->ImportPage(1);
    $Rueckseite = $pdf->ImportPage(2);
    // Seitenabmessungen holen
    $size = $pdf->getTemplateSize($Vorderseite);
    $dokumentBreite = round($size['w'], 2);
    $dokumentHoehe = round($size['h'], 2);
    echo 'Dokumenten Breite: ' . $dokumentBreite . 'mm' . PHP_EOL;
    echo 'Dokumenten Hoehe: ' . $dokumentHoehe . 'mm' . PHP_EOL;
    echo 'Anschnitt: ' . $anschnitt . 'mm' . PHP_EOL;
    // Vorderseite uebernehmen
    // Anfang eines bloeden Hacks wegen des FooterZeilen-Textes.
    // Der Footertext laesst sich nur einfügen, wenn die Seite eine A4 Seite ist.
    // Keine Ahnung warum!
    $pdf->AddPage('L');
    $tplVorderseite = $pdf->importPage(1);
    $pdf->useTemplate($tplVorderseite);
    //Margin ist wegen der Rand-Platzierung des Community Names wichtig.
    $pdf->SetMargins(0, 0, 0);
    // erstmal alle Fonts laden
    echo 'Lade Fonts...' . PHP_EOL;
    $pdf->AddFont('lato-bold');
    $pdf->AddFont('lato-regular');
    $pdf->AddFont('alternategothic');
    // Rendern Titel Text
    echo 'Verarbeite Titel Text...' . PHP_EOL;
    $pdf->SetFont('lato-bold');
    $pdf->SetFontSize($kontaktTitelFontSize);
    $pdf->SetTextColor(0, 0, 0);
    //schwarz
    $pdf->SetXY($kontaktTitelPositionX + $anschnitt, $kontaktTitelPositionY + $anschnitt);
    $pdf->Write(0, iconv('UTF-8', 'windows-1252', $config['kontaktTitelText']));
    // Rendern Info Text
    echo 'Verarbeite Info Text...' . PHP_EOL;
    $pdf->SetTextColor(0, 0, 0);
    //schwarz
    $pdf->SetFontSize($kontaktInfoFontSize);
    foreach ($config['kontaktInfoTexte'] as $a) {
        $pdf->SetFont('lato-bold');
        $pdf->SetXY($kontaktTitelPositionX + $anschnitt, $kontaktInfoPositionY + $anschnitt);
        $pdf->Write(0, iconv('UTF-8', 'windows-1252', $a[0]));
        $pdf->SetFont('lato-regular');
        $pdf->SetXY($kontaktInfoTextPositionX + $anschnitt, $kontaktInfoPositionY + $anschnitt);
        $pdf->Write(0, iconv('UTF-8', 'windows-1252', $a[1]));
        $kontaktInfoPositionY = $kontaktInfoPositionY + $kontaktInfoZeilenOffsetY;
    }
    // Rendern Community Logo
    echo 'Verarbeite Logo...' . PHP_EOL;
    $pdf->Image($config['kontaktLogoDateiName'], $kontaktLogoPositionX + $anschnitt, $config['kontaktLogoPositionY'] + $anschnitt, $config['kontaktLogoWidth'], 0);
    // Rendern Fusszeilen Text
    echo 'Verarbeite Fusszeile...' . PHP_EOL;
    $pdf->SetFont('lato-regular');
    $pdf->SetFontSize($kontaktFooterFontSize);
//.........这里部分代码省略.........
开发者ID:kraeuterhexer,项目名称:ffm-freifunk-faltblatt-6-seiten,代码行数:101,代码来源:flyermod.php


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