This topic provides information about the following:
Printing with Standard Windows Controls
The following example demonstrates using the System.Windows.Controls.Canvas class and how to have a function that can print different file types, (images, PDF, CAD, etc.). This is done by loading the file in an ImGearPage, drawing the ImGearPage to a new Canvas, then printing that Canvas.
Be sure to add the required references to your project for the formats you are printing.
The above snippet uses Native Scaling. More information on Native Scaling and WPF scaling can be found here:
Printing with ImageGear .NET API
The following example demonstrates how to print using the ImGearPageDisplay.Print method. This method draws the image on .NET graphics for printing.
Printing a PDF Document
Native PDF document printing renders the document directly to the printer; it’s fast and requires less memory. The following is an example that demonstrates how to print a PDF with the ImGearPDFDocument.Print() method.
The .NET reference System.Drawing.dll is required for this snippet.
See Also
ImageGear.Formats.Pdf Assembly > ImageGear.Formats.PDF Namespace : ImGearPDFPrintOptions Class
ImageGear.Wpf Assembly > ImageGear.WPF.XPS Namespace > ImGearXPSDocument Class : Print Method