Q: When the pdf document is printing (under .NET), we notice the print
notifications on the screen "Printing page 1..." for as many pages as
are in the document. Is there a way to suppress these notifications and
do a silent print?
---
A: This is more related to .NET Framawork API than to PDFNet.
If you would like to suppress the print status dialog box, you can
instantiate StandardPrintController instead of
PrintControllerWithStatusDialog (which is the default):
PrintDocument printer = new PrintDocument();
Use:
printer.PrintController = New StandardPrintController
as opposed to
printer.PrinterController = New PrintControllerWithStatusDialog
which is the default settings.
To select a given printer just specify its name. For example
printer.DocumentName = _distQueueID;
PrinterSettings settings = new PrinterSettings(); settings.PrinterName
= _destination;
if (settings.IsValid)
{
// Open the PDF document.
_pdfdoc = new PDFDoc(_pathToDoc);
_pdfdoc.InitSecurityHandler();
// Start printing from the first page
_pageitr = _pdfdoc.PageBegin();
// Create PDF rasterizer object - PDFDraw _pdfdraw = new PDFDraw();
printer.PrinterSettings = settings;
// Set the PrintPage delegate which will be invoked to print each
page
printer.PrintPage += new PrintPageEventHandler(PrintPage);
// Start printing
printer.Print();
// Close the file
_pdfdoc.Close();
}