ByteScout PDF Suite - C# - Silent pdf printing with pdf renderer sdk - ByteScout

ByteScout PDF Suite – C# – Silent pdf printing with pdf renderer sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Suite – C# – Silent pdf printing with pdf renderer sdk

silent pdf printing with pdf renderer sdk in C# using ByteScout PDF Suite

How to apply ByteScout PDF Suite for silent pdf printing with pdf renderer sdk in C#

This page helps you to learn from code samples for programming in C#. ByteScout PDF Suite was made to help with silent pdf printing with pdf renderer sdk in C#. ByteScout PDF Suite is the bundle that provides six different SDK libraries to work with PDF from generating rich PDF reports to extracting data from PDF documents and converting them to HTML. This bundle includes PDF (Generator) SDK, PDF Renderer SDK, PDF Extractor SDK, PDF to HTML SDK, PDF Viewer SDK and PDF Generator SDK for Javascript.

The below SDK samples describe how to quickly make your application do silent pdf printing with pdf renderer sdk in C# with the help of ByteScout PDF Suite. If you want to know how it works, then this C# sample code should be copied and pasted into your application’s code editor. Then just compile and run it. Want to see how it works with your data then code testing will allow the function to be tested and work properly.

ByteScout PDF Suite is available as a free trial. You may get it from our website along with all other source code samples for C# applications.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

Program.cs
      
using System; using Bytescout.PDFRenderer; namespace SilentPrinting { class Program { static void Main(string[] args) { const string PrinterName = "Microsoft Print to PDF"; // Create an instance of Bytescout.PDFRenderer.DocumentPrinter object and register it. DocumentPrinter documentPrinter = new DocumentPrinter(); documentPrinter.RegistrationName = "demo"; documentPrinter.RegistrationKey = "demo"; // Load PDF document. documentPrinter.LoadDocumentFromFile("multipage.pdf"); // Change some printing options for demo purposes // (note, some options might be not supported by the printer): // Change paper orientation documentPrinter.Landscape = true; // Set number of copies documentPrinter.Copies = 2; // Set collation documentPrinter.Collate = true; // Force black and white printing documentPrinter.Color = false; // Print all document pages to the specified printer documentPrinter.PrintDocument(PrinterName); // To print specific pages use overridden methods allowing to define pages to print: //documentPrinter.PrintDocument(PrinterName, 2, 4); // printer pages from 3 to 5 //documentPrinter.PrintDocument(PrinterName, new int[] {0, 2, 3, 4, 6}); // print specific pages //documentPrinter.PrintDocument(PrinterName, "1,3-5,7-"); documentPrinter.Dispose(); } } }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout PDF Suite Home Page

Explore ByteScout PDF Suite Documentation

Explore Samples

Sign Up for ByteScout PDF Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout PDF Suite Home Page

Explore ByteScout PDF Suite Documentation

Explore Samples

Sign Up for ByteScout PDF Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next