We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Printing multiple pages

I have an application that uses a Diagram for each page. To implement print and preview functionality, I have the following options 1) use Diagram.CreatePrintDocument and send multiple print documents to the printer. This means we cannot use PrintPreview since you cannot merge PrintDocuments. 2) Create my own PrintDocument class. In PrintDocument.OnPrintPage() create a Metafile for each page. The problem with this, when using Adobe Distiller, text is does not appear as text but as graphics. 3) Create my own PrintDocument class. In PrintDocument.OnPrintPage() use reflection to call Model.PrintPage(). 4) Create my own PrintDocument class Subclass the Model class and make a public version of Model.PrintPage(). My question is: is there a better way to achieve what I want to do?

2 Replies

AD Administrator Syncfusion Team April 25, 2005 11:00 AM

Hi Andrew, You have explored pretty much all the options that are available, and I really cannot think of any other way to implement merged print preview of multiple diagram documents. Providing a custom print document that lets you invoke Model.PrintPage() on each of the diagram Models in your application definitely seems to be the way to go. However, you do not have to subclass the Diagram Model, as the Model class exposes its printing API through the Syncfusion.Windows.Diagram.IPrint interface. All you have to do from your print document is to cast the Model to an IPrint, and invoke the IPrint.PrintPage(PrintPageEventArgs evtArgs) method. Please refer to the class reference documentation on the Syncfusion.Windows.Forms.Diagram.IPrint interface and the Syncfusion.Windows.Forms.Diagram.DiagramPrintDocument classes for additional information on these types. If you have access to the source version of Essential Diagram, referring to the Diagram.Model.PrintPage(...) implementation, and the Diagram.CreatePrintDocument(...) virtual that creates the print document will provide some insight into the Essential Diagram printing mechanism. Regards, Prakash Surendra Syncfusion Inc.,


AC Andrew Coats April 26, 2005 06:40 AM

Thanks; using the interface worked like a dream.

Loader.
Live Chat Icon For mobile
Up arrow icon