Jump to content

novembrezoulou

Members
  • Posts

    5
  • Joined

  • Last visited

novembrezoulou's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. HI all, Thanks for the modifications with french letters... To day, I have two new problems : 1 / it's impossible to create a pdf with the landscqpe orientation. See code under : ------------ begin ------------------ #include "include/MPDF_UDF.au3" _OpenAfter(True);open after generation _SetUnit($PDF_UNIT_CM) _SetPaperSize("A4") _SetZoomMode($PDF_ZOOM_CUSTOM, 90) _SetOrientation($PDF_ORIENTATION_LANDSCAPE) _SetLayoutMode($PDF_LAYOUT_CONTINOUS) ;initialize the pdf _InitPDF(@ScriptDir & "\test.pdf") _LoadFontTT("_Arial", $PDF_FONT_ARIAL) _LoadFontTT("_TimesT", $PDF_FONT_TIMES) _LoadFontTT("_Calibri", $PDF_FONT_CALIBRI) _LoadFontTT("_Garamond", $PDF_FONT_GARAMOND) _BeginPage() _DrawText(6, 20, "édition extrême", "_TimesT", 24, $PDF_ALIGN_RIGHT) _EndPage() ;then, finally, write the buffer to disk _ClosePDFFile() ----------- END ---------------------- 2/ With "nitro reader 2.5.0.45, I get this message when opening the file : "The requested page number is invalid and does not exist in this document" I have no problem with acrobat... (but I use Nitro as my main reader !) Thank you for the answer.
  2. Many thanks !!! It works perfect. No problem, all the values come fron the UDF.
  3. Hi Is there any solution to the problem (precedent post) ? Why pages are adding with the precents ones if i do not leave the program ? Thanks
  4. 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
  5. hi Taietel, Nice UDF ! but... doesn't accept easyly french letters "é" and "à" when browsing with acrobat. (generates plenty of spaces after le letter...) The other ones work well... With foxit, it's better but the next letter is too close to the "é" or the "à". I tried many times, including some "", "@",... but nothing is changing. Then I only made a txt file with "aeiuoéèçàùâêîôû" and tried Txt2Pdf... Same problem. Did you heard about this ? Many thanks ! Sorry for my english... NovembreZoulou
×
×
  • Create New...