08-26-2008, 14:26
|
JoeBussell
Joined on 06-17-2008
Eugene, OR
Posts 62
|
Re: Adding a footer before printing
|
 
 
|
|
|
This solution seems particularly bulky for very large image files. Specifically, the requirement that I form multiple lead objects with the contents of the large bitmap may result in unnecessary slow down of my printing procedure. I am working with an alternative plan, though it does have its challenges. My technique is to write out the header and footer to the printer, and to provide the selected printer hDc to the LEAD.Render call.
' I am using stuff to setup printer and get paper settings, tray settings, etc ' derived from the VB PrinterDlg module (for the lib and a good example search at msdn)
PrinterXYPrint (7.5 - PrinterTextWidth(Title)) / 2, 0#, "My Title"
hDc = Printer.hDc
' removed some stuff that limits the image size to the page size in use... LEAD1.Render hDc, 1, 1, PrintWidth, PrintHeight
PrinterXYPrint (7.5 - Printer.TextWidth(PageStr)) / 2, ypos, "My Footer String"
Where: '*** PrinterXYPrint '*** Draw a string at a specified X,Y location. Sub PrinterXYPrint(X As Single, Y As Single, S As String) On Error Resume Next Printer.CurrentX = GConf.PrintLeftMargin + X Printer.CurrentY = GConf.PrintTopMargin + Y Printer.Print S End Sub
Now if I could only get the lead image to invariably print out what I see I will be golden.
|
|
|
|
|
Report
|
|
|
|