Example #1
0
$pdf->AddPage();
$pdf->SetFont('arial', '', 11);
$pdf->SetTextColor(200, 10, 10);
$pdf->SetFillColor(255, 252, 232);
$pdf->SetStyle("p", "times", "", 11, "130,0,30");
$pdf->SetStyle("pb", "times", "B", 11, "130,0,30");
$pdf->SetStyle("t1", "arial", "", 11, "254,252,222");
$pdf->SetStyle("t1", "arial", "", 11, "0,151,200");
$pdf->SetStyle("t2", "arial", "", 11, "0,151,200");
$pdf->SetStyle("t3", "times", "B", 14, "203,0,48");
$pdf->SetStyle("t4", "arial", "BI", 11, "0,151,200");
$pdf->SetStyle("hh", "times", "B", 11, "255,189,12");
$pdf->SetStyle("ss", "arial", "", 7, "203,0,48");
$pdf->SetStyle("font", "helvetica", "", 10, "0,0,255");
$pdf->SetStyle("style", "helvetica", "BI", 10, "0,0,220");
$pdf->SetStyle("size", "times", "BI", 13, "0,0,120");
$pdf->SetStyle("color", "times", "BI", 13, "0,255,255");
$txt1 = "Done by <t1 href=\"mailto:klodoma@ar-sd.net'>Bintintan Andrei</t1>";
$txt2 = "<p>\r\n<t3>Description</t3>\r\n\r\n\tThis method allows printing <t4><TAG></t4> formatted text with line breaks. They can be automatic (as soon as the text reaches the right border of the cell) or explicit (via the <pb>\\n</pb> character). As many cells as necessary are output, one below the other.\r\nText can be <hh>aligned</hh>, <hh>cente~~~red</hh> or <hh>justified</hh>. Different <font>Font</font>, <size>Sizes</size>, <style>Styles</style>, <color>Colors</color> can be used. The cell block can be framed and the background painted. The behavior/paramaters of the method are the same as to the <t2 href='http://www.fpdf.org/en/doc/multicell.htm'>FPDF Multicell method</t2>. <style href='www.fpdf.org'>Links</style> can be used in any tag.\r\n\t<t4>TAB</t4> spaces (<pb>\\t</pb>) can be used. The <t4>ttags</t4> tag name is reserved for the TAB SPACES.\r\n\tVariable Y relative positions can be used for <ss ypos='-0.8'>Subscript</ss> or <ss ypos='1.1'>Superscript</ss>.</p>\r\n<style>\r\n\t<hh size='50' >Controlled Tab Space~~~</hh> - Tab Space 1\r\n\t<hh size='60' > ~~~</hh><font> - Tab Space 2</font>\r\n\t<hh size='60' > ~~~</hh> - Tab Space 2\r\n\t<hh size='70' > ~~~</hh><hh> - Tab Space 3</hh>\r\n\t<hh size='50' > ~~~</hh> - Tab Space 1\r\n\t<hh size='60' > ~~~</hh><t4> - Tab Space 2</t4>\r\n</style>\r\n\tIf no <t4><TAG></t4> is specified then the FPDF current settings are used.\n\n";
$txt2_1 = "<p>\r\n\t<size size='50'>Paragraphs can be used:~~~- Paragraph 1</size>\r\n\t<style size='50'>50 units~~~- Paragraph 1</style>\r\n\t<style size='60'>60 units~~~</style>- Long Long Text Within Paragraph!!! Don't USE JUSTIFIED ALIGN IN THIS CASE\r\n\t<t4 size='60'>60 units~~~- Paragraph 2</t4></p>\r\n";
$txt3 = "<style>Best Regards</style>";
$pdf->MultiCellTag(0, 5, $txt1, 0, "L", 0);
$pdf->Ln(10);
$pdf->MultiCellTag(0, 5, $txt2, 1, "J", 1);
$pdf->Ln(10);
$pdf->MultiCellTag(0, 5, $txt2_1, 1, "L", 1);
$pdf->Ln(10);
$pdf->MultiCellTag(0, 5, $txt3, 0, "R", 0);
$pdf->Ln(1);
$pdf->Output();
Example #2
0
				// compteur élève
				$cpt_eleve = $cpt_eleve + 1;
			$i = $i + 1;

				// passer à la ligne
				$xcote_passe = $xcote_passe + $largeur + $espacementx;

				// placement de X et Y leur nouveau point
				$ycote_passe = $ycote_passeh; 
				if($cpt_i_l == $nbl) { $ycote_passe = $ycote_passe + $hauteur + $espacementy; $ycote_passeh = $ycote_passe; $xcote_passe = $xcote; }

				}
		$cpt_etiquette = $cpt_etiquette + 1;
			$cpt_i_l = $cpt_i_l + 1;
			}

	 	$cpt_i_h = $cpt_i_h + 1;
		}

	// compteur du nombre d'étiquette affiché sur la page et fin de la boucle des etiquettes par page
//	$cpt_etiquette = $cpt_etiquette + 1;
	}

// compteur de page et fin de la boucle des pages
$cpt_page = $cpt_page + 1;
}
$pref_output_mode_pdf=get_output_mode_pdf();
$pdf->Output('Etiquette_'.date("Ymd_Hi").'.pdf',$pref_output_mode_pdf);
?>
Example #3
0
		else {
			//$h_cell=50;
			// On essaye de calculer une hauteur fonction du nombre de retours à la ligne
			// en controlant que cela tient
			$h_cell=min($compte_retours_ligne*7, 297-$pdf->getY()-10);
		}

		//$largeur_underscore = $pdf->GetStringWidth("__________")/10;
		//$text=preg_replace("/______________________________/","_____________________________ ",$text);
		//$text=preg_replace("/__/","_ ",$text);

		// Les retours à la ligne ne sont pas pris en compte sans ça:
		$text=nl2br($text);
		//$text.=" ".$compte_retours_ligne;

		//cell_ajustee($text,$pdf->GetX(),$pdf->GetY(),$largeur_dispo,$h_cell,$taille_max_police,$taille_min_police,'LRBT');
		cell_ajustee($text,$pdf->GetX(),$pdf->GetY(),$largeur_dispo,$h_cell,$taille_max_police,$taille_min_police,$encadre_cadre[$type_lettre][$cpt_i_cadre]);
		//$pdf->Cell($largeur_dispo, $h_cell, $text,'TLRB',0,'L', '');

		$cpt_i_cadre = $cpt_i_cadre + 1;
	 }

	debug_lettre_pdf("==========================================="."\n");

	$i = $i + 1;
}
$pref_output_mode_pdf=get_output_mode_pdf();

$pdf->Output('Lettre_'.date("Ymd_Hi").'.pdf',$pref_output_mode_pdf);
?>