Examples

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

  1. Create a PrintJob object with printer name and PDF document.
  2. Set Copies.
  3. Set Scaling.
  4. Set if Annotations needs to be printed.
  5. Set Paper Size.
  6. Set Paper Source.
  7. 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:

Why Choose DynamicPDF?

  • Transparent Pricing
  • Lots of Features
  • Easy to Use
  • Great Support
  • Efficient Performance
  • Product Maturity (Over 22 Years)
  • Free Evaluation
  • .NET Core Support (Most Products)
  • Flexible Licensing

We’re Not The Only Ones That Think We’re Great!