Print PDF Byte Array

Printing to a byte array rather than a file requires instantiating an InputPdf instance, where you pass the byte array to the constructor. Then instantiate a new PrintJob instance, where you give the InputPdf instance to the PrintJob instance's constructor. The following example demonstrates printing a PDF byte array.

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

In this topic