Hi,
this UDF is a really good Job. awesome, how easy it is to create a pdf from your script, using this udf.
But i have a Little Problem. I´d like to use a Font without serifs, so i decided to use Arial. But by using the TT, I get a space after each german umlaut (ä, ü, ö). The Arial Standard works, when I open the created File, it always tells me, the /BBox value at Font Helvetica Bold is wrong.
Also there seem to be a bug at creating a Header like in the mixed Example. I can´t create a Header only for the first page. By using $PDF_OBJECT_FIRSTPAGE, it is created for all pages, exept of the first one. Same Problem with using $PDF_OBJECT_EVENPAGES and $PDF_OBJECT_ODDPAGES.
Example:
#include <MPDF_UDF.au3>
Const $iRand_links=20
Const $iRand_rechts=20
Const $iRand_oben=20
Const $iSeitenbreite=210-$iRand_rechts
Const $iSeitenhohe=297-$iRand_oben
_SetTitle("Test")
_SetSubject("Test")
_SetKeywords("Test")
_OpenAfter(True)
_SetUnit($PDF_UNIT_MM)
_SetPaperSize("A4")
_SetZoomMode($PDF_ZOOM_CUSTOM,90)
_SetOrientation($PDF_ORIENTATION_PORTRAIT)
_SetLayoutMode($PDF_LAYOUT_CONTINOUS)
_InitPDF(@ScriptDir & "\Test.pdf")
;fonts:
_LoadFontStandard("_Arial", $PDF_FONT_STD_ARIAL, $PDF_FONT_NORMAL)
_LoadFontStandard("_ArialBold", $PDF_FONT_STD_ARIAL, $PDF_FONT_BOLD)
_LoadFontStandard("_ArialIt", $PDF_FONT_STD_ARIAL, $PDF_FONT_ITALIC)
;=== create objects that are used in multiple pages ===
;create a header on all pages, except the first:
_StartObject("Header", $PDF_OBJECT_FIRSTPAGE)
_DrawText($iRand_links, $iSeitenhohe, "This Header should only be at the 1st page!", "_Arial", 12, $PDF_ALIGN_LEFT)
_EndObject()
_BeginPage()
_DrawText($iRand_links, $iSeitenhohe-50, "Arial standard", "_Arial", 12, $PDF_ALIGN_LEFT)
_DrawText($iRand_links, $iSeitenhohe-55, "Arial standard Bold", "_ArialBold", 12, $PDF_ALIGN_LEFT)
_DrawText($iRand_links, $iSeitenhohe-60, "Arial standard Italic", "_ArialIt", 12, $PDF_ALIGN_LEFT)
_EndPage()
_BeginPage()
_EndPage()
_BeginPage()
_EndPage()
_ClosePDFFile()
Exit