Hello, Drinkwater,
Currently only the binary is available. But if you want to work deeper on the technique details, we would like to discuss with you.
Hi DrinkWater,
Printer object is written in VB.Net. It is a layer of abstraction on the System.Drawing.PrintDocument that shipped with VS 2005.
It would be nice to have the source code to be able to see exactly how the page breaks are done. That's really what I am trying to emulate but can't figure out how control the page breaks myself.
Can you offer any guidance if you can't offer the source code ?
The following code shows how to control page breaks by yourself. Hope it will solve your problem.
Imports System.Drawing
Imports System.Drawing.Printing
Dim document As New PrintDocument
Dim controller As PrintController = document.PrintController
Dim pageSettings As PageSettings = document.DefaultPageSettings
Dim printEventArgs As New PrintEventArgs
Dim printPageEventArgs As New PrintPageEventArgs(Nothing, _
pageSettings.Bounds, pageSettings.Bounds, pageSettings)
Dim g As Graphics
controller.OnStartPrint(document, printEventArgs)
g = controller.OnStartPage(document, printPageEventArgs)
g.DrawString("Page 1", SystemFonts.CaptionFont, Brushes.Black, 0, 0)
controller.OnEndPage(document, printPageEventArgs)
g = controller.OnStartPage(document, printPageEventArgs)
g.DrawString("Page 2", SystemFonts.CaptionFont, Brushes.Black, 0, 0)
controller.OnEndPage(document, printPageEventArgs)
controller.OnEndPrint(document, printEventArgs)