Skip to main content

Documentation

Version: 4.0

Printing Secure PDFs

DynamicPDF PrintManager supports printing password-protected PDF documents by supplying the document password when creating the InputPdf object. Once authenticated, the secured PDF can be printed like any other PDF document.

InputPdf inputPdf = new InputPdf(Util.GetPath("Resources/secured.pdf"), "password");
PrintJob printJob = new PrintJob(Printer.Default, inputPdf);
printJob.Print();
Dim inputPdf As New InputPdf(Util.GetPath("Resources/secured.pdf"), "password")
Dim printJob As New PrintJob(Printer.Default, inputPdf)
printJob.Print()

[SecuredExample.cs](https://github.com/DynamicPDF/print-manager-dotnet-core/blob/master/print-manager-dotnet-core-cs/SecuredExample.cs){#gitlink-id target=_blank}


[SecuredExample.vb](https://github.com/DynamicPDF/print-manager-dotnet-core/blob/master/print-manager-dotnet-core-vb/SecuredExample.vb){#gitlink-id target=_blank}

info

Attempting to print a PDF with an incorrect password results in a ceTe.DynamicPDF.Printing.InvalidPasswordException exception.

Documentation version