[PDFNet] Simple way to print PDF from VB

Q: I have developed a Kiosk app using vb.net and need to print complex
PDF files. printing the pdf documents are not so easy. I have tried
many ways, and always run into roadblocks, or authentication issues.
Can I use PDFNet SDK for printing?
------------
A: You can use PDFNet SDK (http://www.pdftron.com/pdfnet/index.html)
to print PDF in server or client based applications.

As a starting point you may want to take a look at PDFPrint sample:
   http://www.pdftron.com/pdfnet/samplecode.html#PDFPrint

PDFNet offers several ways to print a PDF document (with different
performance characteristics and the above sample outlines a few
different approaches).

In case you are looking for a most simple solution you can use
pdftron.Print.StartPrintJob as shown below:

PDFNet.Initialize()
Dim doc As PDFDoc = New PDFDoc("in.pdf")
doc.InitSecurityHandler()

' To setup printing options:
Dim printerMode As PrinterMode = New PrinterMode
printerMode.SetCollation(True)
printerMode.SetCopyCount(1)
printerMode.SetDuplexing(printerMode.DuplexMode.e_Duplex_Auto)
printerMode.SetOutputQuality(printerMode.OutputQuality.e_OutputQuality_Medium)

' Print the document on the default printer, name the print job the
name of the ' file, print to the printer not a file, and use default
printer options:
Print.StartPrintJob(doc, "", doc.GetFileName(), "", printerMode)

For the full sample please refer to PDFPrint sample that comes as part
of PDFNet SDK.

If your PDF is protected with password security you can use
doc.InitStdSecurityHandler("mypass") instead of
doc.InitSecurityHandler(). The function returns false if password is
not valid and it can be called multiple times.

--
You received this message because you are subscribed to the "PDFTron PDFNet SDK" group. To post to this group, send email to support@pdftron.com
To unsubscribe from this group, send email to pdfnet-sdk-unsubscribe@googlegroups.com. For more information, please visit us at http://www.pdftron.com

Subscription settings: http://groups.google.com/group/pdfnet-sdk/subscribe?hl=en