#CS ------------------------------------------------------------------------ AutoIt Version 3.3.10.2 Test d'alignement de texte #CE ------------------------------------------------------------------------- #include "MPDF_UDF_CB3.au3" _OpenAfter(True) _SetUnit($PDF_UNIT_MM) _SetPaperSize("A4") _SetZoomMode($PDF_ZOOM_FULLPAGE) _SetOrientation($PDF_ORIENTATION_PORTRAIT) _SetLayoutMode($PDF_LAYOUT_CONTINOUS) _InitPDF("Test CB.pdf") ;-- chargement polices ---------------- _LoadFontTT("Arial", $PDF_FONT_ARIAL, $PDF_FONT_NORMAL) _LoadFontTT("Arialb", $PDF_FONT_ARIAL, $PDF_FONT_BOLD) _LoadFontTT("Ariali", $PDF_FONT_ARIAL, $PDF_FONT_ITALIC) _LoadFontTT("Arialbi", $PDF_FONT_ARIAL, $PDF_FONT_BOLDITALIC) _LoadFontTT("C128Barcode", $PDF_FONT_C128, $PDF_FONT_NORMAL); police C128.TTF chargée après --- ;-- Réalisation page ------------------ _BeginPage() _DrawLine(105, 0, 105, 297, $PDF_STYLE_STROKED, 10, 0.1, 0x000000, 0, 0) ;-- Repère centre page -- __FontC128( $PDF_FONT_NORMAL) ; appel de la fonction de définition de la police C128Barcode _DrawText(105, 280, "ÌDCFA34C901{Î", "C128Barcode", 26, $PDF_ALIGN_CENTER, 0) _DrawText(105, 270, "ÌDCFA34C901{Î", "C128Barcode", 26, $PDF_ALIGN_LEFT, 0) _DrawText(105, 260, "ÌDCFA34C901{Î", "C128Barcode", 26, $PDF_ALIGN_RIGHT, 0) __FontArial($PDF_FONT_BOLD) ; appel de la fonction de définition de la police Arialb _DrawText(105, 250, "CENTRE", "Arialb", 12, $PDF_ALIGN_CENTER, 0) _DrawText(105, 240, "GAUCHE", "Arialb", 12, $PDF_ALIGN_LEFT, 0) _DrawText(105, 230, "DROITE", "Arialb", 12, $PDF_ALIGN_RIGHT, 0) $Texte = "Maître corbeau sur un arbre perché, tenait en son bec un fromage" _DrawText(105, 220, $Texte, "Arialb", 12, $PDF_ALIGN_CENTER, 0) _DrawText(105, 210, $Texte, "Arialb", 12, $PDF_ALIGN_LEFT, 0) _DrawText(105, 200, $Texte, "Arialb", 12, $PDF_ALIGN_RIGHT, 0) _EndPage() _ClosePDFFile() ;================================================================== Func _Iif($fTest, $vTrueVal, $vFalseVal) If $fTest Then Return $vTrueVal Else Return $vFalseVal EndIf EndFunc ;==>_Iif