This is a printing UDF which allows you to print text in any font, size and colour at any position on the page, draw lines, curves, elipses, pies in any colour, and print images. Useful for labels, reports, graphs and standard forms. Can also print barcodes. It uses my printmg.dll. It is not intended to do the sorts of thing you can do with the Word UDF by big_daddy.
Note the dll is 32 bit and so only works with 32 bit applications. printout from the code in the example in the download.
Functions available are - Start using/Finish using the UDF
_PrintDllStart _PrintDllClose
_PrintVersion - Returns version of UDF or dll
_PrintSetTitle Printer control
_PrintStartPrint
_PrintAbort
_PrintEndPrint
_PrintNewPage Printer selection, getting & setting parameters
_PrintListPrinters - lists all installed printers
_PrintSetPrinter - manual printer selection dialogue
_PrintSelectPrinter - programmatically set the printer.
_PrintGetPageWidth
_PrintGetPaperWidth
_PrintGetPageHeight
_PrintGetPaperHeight
_PrintGetHorRes
_PrintGetVertRes
_PrintGetXOffset
_PrintGetYOffset
_PrintPageOrientation - set portrait or landsacpe Text printing
_PrintSetFont - Font, size, attributes and colour
_PrintText - At x,y and angle.
_PrintGetextWidth
_PrintGetTextHeight Graphics
_PrintSetLineCol
_PrintSetLIneWid
_PrintSetBrushCol - sets the colour used for filling
_PrintLine
_PrintEllipse - Filled ellipse or circle
_PrintPie - for filled pie slice
_PrintArc - Elliptical or circular arcs
_PrintRectangle - filled rectangle
_PrintRoundedRectangle
_PrintImage - prints jpg, bmp and ico files (Has problems with some icons bigger than 64 x 64)
_PrintImageFromDC
Latest change = 25th February 2011
Added example to the download which was missing. Get the UDF, dll and example from here.
=================================================================
See also these udf's for printing from AutoIt using the Windows API and not using a dll.
by GRS - http://www.autoitscript.com/forum/topic/...m-autoit/page__view__findpost_
by Prog@ndy -http://www.autoitscript.com/forum/topic/...gdi-udfs/page__view__findpost_
and this one which embeds a dll in the script for creating pdf files.
printing to a pdf by taietel see