本文整理汇总了PHP中FPDI::SetFontSize方法的典型用法代码示例。如果您正苦于以下问题:PHP FPDI::SetFontSize方法的具体用法?PHP FPDI::SetFontSize怎么用?PHP FPDI::SetFontSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FPDI
的用法示例。
在下文中一共展示了FPDI::SetFontSize方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
示例2: die
$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 = ", денна форма навчання";
}
if ($row['study_type'] == "Заочна") {
$type = ", заочна форма навчання";
}
示例3: FPDI
file_put_contents('img.png', $unencodedData);
//Show the image
//echo '<img src="'.$_POST['img_val'].'" />';
$pdf = new FPDI();
$pdf->setSourceFile('TemplateReporte.pdf');
// seteamos la fuente, el estilo y el tamano
$pdf->SetFont('Times', 'B', 10);
// seteamos la posicion inicial
$pdf->SetXY(25, 80);
date_default_timezone_set('America/Bogota');
setlocale(LC_ALL, "es_ES");
$dias = array("Domingo", "Lunes", "Martes", "Miercoles", "Jueves", "Viernes", "Sábado");
$meses = array("Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre");
//agregamos una pagina
$pdf->AddPage();
$pdf->SetFont('Arial');
// seleccionamos la primera pagina del docuemnto importado
$tplIdx = $pdf->importPage(1);
// usamos la pagina importado como template
$pdf->useTemplate($tplIdx);
//seteamos la posicion X
$pdf->SetX(25);
//salto de linea
$pdf->Ln(55.2);
$pdf->SetFontSize(9);
$pdf->Write(0, utf8_decode(" " . $dias[date('w')] . " " . date('d') . " de " . $meses[date('n') - 1] . " del " . date('Y')));
$pdf->Image('img.png', 50, 110, 200);
unlink('img.png');
$pdf->Ln(155);
$pdf->Write(0, utf8_decode(" Relación de costos anuales sobre proyectos ejecutados con éxito."));
$pdf->Output();
示例4: elseif
$pdf->useTemplate($templateId);
$pdf->SetAutoPageBreak(false);
$pdf->SetFillColor(255, 242, 0);
//$db = new SQLite3('/home1/columch7/public_html/Columbia.db');
$db = new SQLite3($columbiaDB);
$ID = $_GET["ID"];
$AUTH = $_GET["AUTH"];
$results = $db->query('SELECT * FROM benton_new_patients where ID =' . $ID . ' and AUTH = ' . $AUTH);
//$results = $db->query('SELECT * FROM Pasco_new_patients where ID=24');
$row = $results->fetchArray();
//print var_dump($row);
//exit();
//Name
$pdf->SetFont('Helvetica');
$pdf->SetTextColor(0, 0, 0);
$pdf->SetFontSize(10);
$pdf->SetXY(17, 10.7);
$pdf->Write(10, $row["FIRST_NAME"] . " " . $row["LAST_NAME"]);
//Date
$pdf->SetFontSize(10);
$pdf->SetXY(115, 10.7);
$pdf->Write(10, $row["TODAY_DATE"]);
//Age
$pdf->SetFontSize(10);
$pdf->SetXY(168, 10.7);
$pdf->Write(10, $row["AGE"]);
//Gender
if ('M' == $row["GENDER"]) {
$pdf->Rect(195, 13, 4, 4);
} elseif ('F' == $row["GENDER"]) {
$pdf->Rect(200.5, 13, 3.5, 4);
示例5: appendVoidText
public static function appendVoidText($path_to_dir,$filename,$page=''){
require_once(Yii::app()->basePath.'/extensions/Fpdf/fpdf.php');
require_once(Yii::app()->basePath.'/extensions/Fpdi/fpdi.php');
$pdf = new FPDI();
$pdf->setSourceFile($path_to_dir.'/'.$filename);
$tplIdx = $pdf->importPage(1, '/MediaBox');
$pdf->addPage();
$pdf->useTemplate($tplIdx, true);
//die("after set sourse");
try{
$pdf->SetFont('Helvetica','B',20);
$pdf->SetTextColor(255,0,0);
$pdf->SetXY (10,5);
$pdf->SetFontSize(10);
$pdf->Write(5,'VOID void VOID void VOID void VOID void VOID void VOID void VOID void VOID void VOID void VOID ');
$pdf->Output($path_to_dir.'/'.$filename,'F');
}catch (Exception $e) {
$result['error']="Could not render this file";
die('Could not render this file');
}
$result['path_to_dir']=$path_to_dir;
$result['filename']=$filename;
$result['ext']='pdf';
return $result;
}
示例6: download_card
public function download_card()
{
$theme = Input::has('theme') ? Input::get('theme') : '1';
$card_name = Input::has('name') ? Input::get('name') : 'Sam Sample';
$card_number = substr_replace(str_pad(Input::has('no') ? Input::get('no') : '1', 8, '0', STR_PAD_LEFT), ' ', 4, 0);
if ($user = Auth::user()) {
$member = Member::where('user_id', '=', $user->id)->first();
$card_name = $member->firstname . ' ' . $member->lastname;
$theme = $member->member_type != '' ? $member->member_type : '0';
$card_number = substr_replace(str_pad($member->id, 8, '0', STR_PAD_LEFT), ' ', 4, 0);
}
$pdf = new FPDI('L');
$pdf->setPrintHeader(false);
$pdf->setPrintFooter(false);
$pdf->AddPage();
switch ($theme) {
case '0':
$pdf->setSourceFile(realpath(dirname(__FILE__)) . '/../../public/assets/pdf/01_tigerair_if_70s_brown_memcard.pdf');
$pdf->SetTextColor(255, 255, 255);
break;
case '1':
$pdf->setSourceFile(realpath(dirname(__FILE__)) . '/../../public/assets/pdf/02_tigerair_if_green_memcard.pdf');
$pdf->SetTextColor(255, 255, 255);
break;
case '2':
$pdf->setSourceFile(realpath(dirname(__FILE__)) . '/../../public/assets/pdf/03_tigerair_if_purple_memcard.pdf');
$pdf->SetTextColor(255, 255, 255);
break;
case '3':
$pdf->setSourceFile(realpath(dirname(__FILE__)) . '/../../public/assets/pdf/19_tigerair_if_bling_bling_memcard.pdf');
$pdf->SetTextColor(255, 255, 255);
break;
case '4':
$pdf->setSourceFile(realpath(dirname(__FILE__)) . '/../../public/assets/pdf/05_tigerair_if_bronze_memcard.pdf');
$pdf->SetTextColor(255, 255, 255);
break;
case '5':
$pdf->setSourceFile(realpath(dirname(__FILE__)) . '/../../public/assets/pdf/06_tigerair_if_second_place_memcard.pdf');
$pdf->SetTextColor(255, 255, 255);
break;
case '6':
$pdf->setSourceFile(realpath(dirname(__FILE__)) . '/../../public/assets/pdf/07_tigerair_if_platinum_memcard.pdf');
$pdf->SetTextColor(255, 255, 255);
break;
case '7':
$pdf->setSourceFile(realpath(dirname(__FILE__)) . '/../../public/assets/pdf/08_tigerair_if_chocolate_memcard.pdf');
$pdf->SetTextColor(255, 255, 255);
break;
case '8':
$pdf->setSourceFile(realpath(dirname(__FILE__)) . '/../../public/assets/pdf/09_tigerair_if_dark_black_memcard.pdf');
$pdf->SetTextColor(255, 255, 255);
break;
case '9':
$pdf->setSourceFile(realpath(dirname(__FILE__)) . '/../../public/assets/pdf/10-tigerair_if_boring_white_memcard.pdf');
$pdf->SetTextColor(90, 89, 85);
break;
case '10':
$pdf->setSourceFile(realpath(dirname(__FILE__)) . '/../../public/assets/pdf/11_tigerair_if_antarctic_memcard.pdf');
$pdf->SetTextColor(90, 89, 85);
break;
case '11':
$pdf->setSourceFile(realpath(dirname(__FILE__)) . '/../../public/assets/pdf/12_tigerair_if_soy_latte_memcard.pdf');
$pdf->SetTextColor(90, 89, 85);
break;
case '12':
$pdf->setSourceFile(realpath(dirname(__FILE__)) . '/../../public/assets/pdf/20_tigerair_if_triple_platinum_emerald_memcard.pdf');
$pdf->SetTextColor(255, 255, 255);
break;
case '13':
$pdf->setSourceFile(realpath(dirname(__FILE__)) . '/../../public/assets/pdf/14_tigerair_if_beer_memcard.pdf');
$pdf->SetTextColor(255, 255, 255);
break;
case '14':
$pdf->setSourceFile(realpath(dirname(__FILE__)) . '/../../public/assets/pdf/15_tigerair_if_wood_paneling_memcard.pdf');
$pdf->SetTextColor(255, 255, 255);
break;
case '15':
$pdf->setSourceFile(realpath(dirname(__FILE__)) . '/../../public/assets/pdf/16_tigerair_if_aerobics_blue_memcard.pdf');
$pdf->SetTextColor(255, 255, 255);
break;
case '16':
$pdf->setSourceFile(realpath(dirname(__FILE__)) . '/../../public/assets/pdf/17_tigerair_if_turkish_delight_memcard.pdf');
$pdf->SetTextColor(90, 89, 85);
break;
case '17':
$pdf->setSourceFile(realpath(dirname(__FILE__)) . '/../../public/assets/pdf/18_tigerair_if_golden_glow_memcard.pdf');
$pdf->SetTextColor(255, 255, 255);
break;
}
$tplIdx = $pdf->importPage(1);
$pdf->useTemplate($tplIdx);
$pdf->SetFont('museosansrounded700');
$pdf->SetFontSize(8);
$pdf->SetXY(52, 118);
$pdf->Write(10, $card_name);
$pdf->SetXY(52, 122);
$pdf->Write(10, $card_number);
$pdf->Output('membership-card.pdf');
}
示例7: die
$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/dogovir2015.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(20, 40);
$pdf->Write(5, $row['lastname'] . " " . $row['firstname'] . " " . $row['patronymic']);
$pdf->SetXY(20, 47);
$pdf->Write(5, $row['pasp_serial'] . " " . $row['pasp_number'] . " виданий " . $row['pasp_issue'] . " " . date("d.m.Y", $row['pasp_date']));
$pdf->SetXY(20, 80);
$pdf->Write(5, $row['lastname'] . " " . $row['firstname'] . " " . $row['patronymic']);
$pdf->SetXY(35, 87);
if ($row['study_type'] == "Денна") {
$pdf->Write(5, "денною");
}
if ($row['study_type'] == "Заочна") {
$pdf->Write(5, "заочною");
}
$pdf->SetXY(160, 87);
if ($row['type'] == "mag") {
示例8: FPDI
} else {
$info_veto = json_decode($info_veto, true);
}
// initiate FPDI
$pdf = new FPDI();
// add a page
$pdf->AddPage();
// set the source file
$pdf->setSourceFile("../image/patron_image/certificat_sanitaire.pdf");
// import page 1
$tplIdx = $pdf->importPage(1);
// use the imported page and place it at point 10,10 with a width of 100 mm
$pdf->useTemplate($tplIdx, 0, 0, 0);
// now write some text above the imported page
$pdf->SetFont('Helvetica');
$pdf->SetFontSize(12);
$pdf->SetTextColor(0, 0, 0);
foreach ($array_sani as $row) {
$pdf->SetXY($row['posx'], $row['posy']);
$pdf->Write(0, requetemysql::gestion_string_maj(remplissage_formulaire($row, $info_veto, $info_client, $info_animal)));
}
$pdf->Output('../sauvegarde/animaux/' . $_POST['animal_id'] . '/certif_sanitaire_' . $variable . '.pdf', F);
echo json_encode($variable);
} elseif ($_GET['action'] == 'modif_lot') {
$sql = "UPDATE medicament set lot=:lot WHERE nom=:nom and permission=:permission LIMIT 1";
$st2 = $db->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY));
$st2->execute(array(':lot' => $_POST['lot'], ':nom' => $_POST['nom'], ':permission' => $_SESSION['login']));
$st2->closeCursor();
echo json_encode("ok");
} elseif ($_GET['action'] == 'medic') {
$medicament = requetemysql::recup_medic(array('nom' => $_GET['recherche']));
示例9: setlocale
date_default_timezone_set('America/Bogota');
setlocale(LC_ALL, "es_ES");
$dias = array("Domingo", "Lunes", "Martes", "Miercoles", "Jueves", "Viernes", "Sábado");
$meses = array("Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre");
//agregamos una pagina
$pdf->AddPage();
$pdf->SetFont('Arial');
// seleccionamos la primera pagina del docuemnto importado
$tplIdx = $pdf->importPage(1);
// usamos la pagina importado como template
$pdf->useTemplate($tplIdx);
//seteamos la posicion X
$pdf->SetX(25);
//salto de linea
$pdf->Ln(55.2);
$pdf->SetFontSize(9);
$pdf->Write(0, utf8_decode(" " . $dias[date('w')] . " " . date('d') . " de " . $meses[date('n') - 1] . " del " . date('Y')));
$pdf->Ln(10);
$pdf->SetFontSize(15);
$pdf->write(15, ' ' . $proBasic["nombreProyecto"]);
$pdf->Ln(10);
$pdf->SetFontSize(12);
$pdf->write(15, ' ' . utf8_decode($proBasic["nombreProyecto"]));
$pdf->Ln(6);
$pdf->write(15, ' ' . $proBasic["fechaInicio"]);
$pdf->Ln(6);
$pdf->write(15, ' ' . $proBasic["fechaFin"]);
$pdf->Ln(6);
$pdf->write(15, ' ' . utf8_decode($proBasic["estadoProyecto"]));
$pdf->Ln(6);
$pdf->write(15, ' ' . $proBasic["ejecutado"] . '%');
示例10:
$tplIdx = $pdf->importPage(1);
$pdf->useTemplate($tplIdx, 5, 5, 200, 0, true);
} else {
$pdf->setSourceFile('pdf/gurps4e-oficial-en.pdf');
$tplIdx = $pdf->importPage(1);
$pdf->useTemplate($tplIdx, -5, 7, 220, 0, true);
}
$pdf->SetFont('Helvetica', '', 9);
$pdf->SetTextColor(0, 0, 0);
$pdf->SetXY(72, 15.5);
$pdf->Write(0, $personagem->getNome());
$pdf->SetXY(134, 15.5);
$pdf->Write(0, $jogador->getNome());
$pdf->SetXY(188, 15.5);
$pdf->Write(0, $personagem->getTotalPonto());
$pdf->SetFontSize(7);
$pdf->SetXY(71.5, 21.5);
$pdf->WriteCenter(9, 0, number_format($personagem->getPeso(), 1, ',', '.'));
$pdf->SetXY(89, 21.5);
$pdf->Write(0, $personagem->getAlturaTexto());
$pdf->SetFontSize(9);
$pdf->SetXY(149, 21.5);
$pdf->Write(0, $personagem->getIdade());
$pdf->SetXY(79, 27.5);
$pdf->Write(0, $personagem->getAparencia());
$pdf->SetFont('Helvetica', '', 16);
$pdf->SetXY(23, 43);
$pdf->WriteCenter(10, 0, $personagem->getST());
$pdf->SetXY(23, 55);
$pdf->WriteCenter(10, 0, $personagem->getDX());
$pdf->SetXY(23, 68);
示例11: FlyerRendering
//.........这里部分代码省略.........
// 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);
//weiss
$pdf->SetXY($kontaktFooterPositionX + $anschnitt, $kontaktFooterPositionY + $anschnitt);
$pdf->Cell($kontaktFooterWidth, 0, iconv('UTF-8', 'windows-1252', $kontaktFusszeileText), 0, 0, 'C');
// Rendern Community Name
echo "Verarbeite Community Name...\n";
$pdf->SetFont('alternategothic');
示例12: 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);
//.........这里部分代码省略.........