Q: I want to print 2 PDF documents with only a single prompt for
printer, using the standard PDFViewCtrl.Print() method. I can see how
to pass in the printer name, but how do I get the printer name back
from the first call?
myPDFView1.Print(); // get printer name back
myPDFView2.Print(1, 999, Page.Rotate.e_0, 1, “printer_name”);
// Could use myPDFDoc2.GetPageCount in place of “999” if actual page
A: Unfortunately there is no method (in PDFNet) to get the printer
name back. You could probably use standard functions in your
application Framework (i.e. .NET, Win32, JAVA?) to obtain the name of
the current default printer.
In case you would like more control over printing than what is
provided in PDFViewCtrl.Print() you could implement your own print
function (as shown in PDFPrint and PDFView sample [code commended out