ByteScout PDF Renderer SDK - C# - Silent PDF Printing - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

ByteScout PDF Renderer SDK – C# – Silent PDF Printing

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Renderer SDK – C# – Silent PDF Printing

silent PDF printing in C# with ByteScout PDF Renderer SDK

Make silent PDF printing in C#

:

Tutorial on how to do silent PDF printing in C#

We’ve created and updating regularly our sample code library so you may quickly learn silent PDF printing and the step-by-step process in C#. Silent PDF printing in C# can be implemented with ByteScout PDF Renderer SDK. ByteScout PDF Renderer SDK is the SDK for rendering of PDF into thumbnails and images in high quality. Provides various functions like batch processing, PNG, TIFF output. Can be used from web and desktop applications.

C# code snippet like this for ByteScout PDF Renderer SDK works best when you need to quickly implement silent PDF printing in your C# application. In order to implement this functionality, you should copy and paste code below into your app using code editor. Then compile and run your application. This basic programming language sample code for C# will do the whole work for you in implementing silent PDF printing in your app.

Trial version can be obtained from our website for free. It includes this and other source code samples for C#.

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 Renderer SDK Home Page

Explore ByteScout PDF Renderer SDK Documentation

Explore Samples

Sign Up for ByteScout PDF Renderer SDK 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 Renderer SDK Home Page

Explore ByteScout PDF Renderer SDK Documentation

Explore Samples

Sign Up for ByteScout PDF Renderer SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next