HI...
Another question.. on the same topic
this script : #include <GUIConstantsEx.au3>
#include <GUIButton.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <array.au3>
#include <ArrayEx.au3>
#include <file.au3>
#include <String.au3>
#include <MPDF_UDF.au3>
While 1
$nMsg=MsgBox(4,'Décision','Désirez-vous imprimer une lettre ? '& @crlf & 'Wish to print a letter ?')
While 1
Switch $nMsg
Case 6
_Edilet()
ExitLoop
Case 7
ExitLoop
EndSwitch
WEnd
If $nMsg=7 Then
Exit
EndIf
WEnd
Func _Edilet()
_SetTitle("Association")
_SetSubject("Convocation")
_SetKeywords("Essai, Trial")
_OpenAfter(True);open after generation
_SetUnit($PDF_UNIT_CM)
_SetPaperSize("A4")
_SetZoomMode($PDF_ZOOM_CUSTOM,90)
_SetOrientation($PDF_ORIENTATION_PORTRAIT)
_SetLayoutMode($PDF_LAYOUT_CONTINOUS)
_InitPDF(@ScriptDir & "lettre.pdf")
;_LoadFontStandard("_Times", $PDF_FONT_STD_TIMES)
_LoadFontTT("_Arial", $PDF_FONT_ARIAL)
_LoadFontTT("_TimesT", $PDF_FONT_TIMES)
_LoadFontTT("_Calibri", $PDF_FONT_CALIBRI)
_LoadFontTT("_Garamond", $PDF_FONT_GARAMOND)
;_LoadFontTT("_Symbol", $PDF_FONT_SYMBOL)
;=== create objects that are used in multiple pages ===
;create a header on all pages, except the first:
_StartObject("Entete", $PDF_OBJECT_ALLPAGES);NOTFIRSTPAGE)
;change the colour of the text that follows
_SetColourFill(0x323232)
;stretch it a bit, down to 90%
;~ _SetTextHorizontalScaling(100)
;and begin writting some data
_SetColourFill("0x0000FF"); 0xFF00FF=rose 0x0000FF=bleu
_DrawText(12, 28, "Association Jean Dupont", "_Arial", 24, $PDF_ALIGN_CENTER);StringUpper("Et adipiscing nec nisi elementum natoque!")
_DrawText(12, 27, "Accociation loi 1901", "_Arial", 12, $PDF_ALIGN_CENTER)
_DrawText(12, 25.5, "5, rue Victor HUGO", "_Arial", 14, $PDF_ALIGN_CENTER)
_DrawText(12, 24.5, "98765, La rue du puis", "_Arial", 14, $PDF_ALIGN_CENTER)
_DrawText(12, 23.5, 'Téléphone / Fax / Répondeur : +33-1 23 45 67 89', "_Calibri", 12, $PDF_ALIGN_CENTER)
_EndObject()
;start a page
_BeginPage()
;~ Empty page...
_EndPage()
_ClosePDFFile()
EndFunc
works fine but, if i print many times before leaving the program, the PDF file contains many pages...
I want to begin an empty page for each call of the function because the future page will be another personnal invoice for another member and have to be send to each by mail...
I think I must empty a buffer... but witch ?
Thank you for your answer