Print PDF byte array in C#

Printing PDF byte array using DynamicPDF Print Mangaer is simple and easy.

How to print PDF byte array in C#

Below are the steps and sample code to print PDF byte array using the Print Manager product.

Steps for printing PDF byte array

  1. Retrieve the byte array from PDF document.
  2. Create a InputPdf with the byte array.
  3. Create a PrintJob with the Printer and the input pdf.
  4. Print using the Print Job object.

Sample Code - C#

byte[] pdfBytes = System.IO.File.ReadAllBytes("DocumentA.pdf");
 
InputPdf pdf = new InputPdf(pdfBytes);
PrintJob printJob = new PrintJob(Printer.Default, pdf);
 
printJob.Print();

Getting Started

NuGet Package

DynamicPDF PrintManager is available on NuGet and is part of the ceTe.DynamicPDF.Printing.NET package.

Nuget Logo
NuGet Package ID: ceTe.DynamicPDF.Printing.NET

Example Project

An example project showing this functionality can be cloned or viewed from GitHub:

GitHub Logo
Clone or View Example Project on GitHub

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 18 Years)
  • Free Evaluation
  • .NET Core Support (Most Products)
  • Flexible Licensing

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