Set Print options (.NET Core/Framework)
Setting Print options using DynamicPDF Print Mangaer is simple and easy. Once the Print job is created with the required PDF document, the print options for different properties like Copies, Scaling, Paper size etc., can be set.
How to set Print options in C#
Below are the steps and sample code to set Print options using the Print Manager product.
Steps for setting Print options
- Create a
PrintJob
object with printer name and PDF document. - Set Copies.
- Set Scaling.
- Set if Annotations needs to be printed.
- Set Paper Size.
- Set Paper Source.
- Print using the Print Job object.
Sample Code - C#
PrintJob printJob = new PrintJob("Printer Name", "DocumentA.pdf");
printJob.PrintOptions.Copies = 2;
printJob.PrintOptions.Scaling = PageScaling.ActualSize;
printJob.PrintOptions.PrintAnnotations = false;
printJob.PrintOptions.SetPaperSizeByName("Legal");
printJob.PrintOptions.SetPaperSourceByName("Tray 2");
printJob.Print();
Getting Started
NuGet Package
DynamicPDF PrintManager is available on NuGet and is part of the ceTe.DynamicPDF.Printing.NET
package.
NuGet Package ID: ceTe.DynamicPDF.Printing.NET
DynamicPDF PrintManager Information
More information can be found here: