Dispose PDF after Printing
When done working with the PDF we recommend disposing of it explicitly by calling the Dispose method. The example below demonstrates how to dispose a PDF after printing.
InputPdf pdf = new InputPdf("DocumentA.pdf");
PrintJob printJob = new PrintJob(Printer.Default, pdf);
printJob.Print();
pdf.Dispose();
Dim pdf As InputPdf = New InputPdf("DocumentA.pdf")
Dim printJob As PrintJob = New PrintJob(Printer.Default, pdf)
printJob.Print()
pdf.Dispose()