Hello,
I evaluate PDFNet 6.6.1 and found several issues in it. First of one is failed attempt in printing attached PDF file:
http://download.print-driver.com/files_exchange/mb/PDFNet-issue01.zip
Please let me know if you are able to fix this issue. I plan to use PDFNet in my software products. Receiving bug reports for end-users is common situation for me. And I would like to be sure, that if I order PDFNet, I will be able to receive fixed builds.
My code is below.
Function PrintFile(sPDFFile As String, sPrinter As String) As Boolean
Dim bResult = False
Dim doc As PDFDoc = Nothing
Try
doc = New PDFDoc(sPDFFile)
doc.InitSecurityHandler()
Catch ex As Exception
Console.WriteLine(“Failed attempt in loading file '” + sPDFFile + "’. Exception message: " + ex.Message)
Return False
End Try
Dim printerMode As PrinterMode = New PrinterMode
printerMode.SetCollation(True)
printerMode.SetCopyCount(1)
printerMode.SetDuplexing(printerMode.DuplexMode.e_Duplex_Auto)
printerMode.SetOutputColor(printerMode.OutputColor.e_OutputColor_Color)
printerMode.SetOutputQuality(printerMode.OutputQuality.e_OutputQuality_High)
printerMode.SetAutoRotate(True)
printerMode.SetAutoCenter(True)
printerMode.SetScaleType(PDF.PrinterMode.ScaleType.e_ScaleType_ReduceToOutputPage)
printerMode.SetDPI(300) ’ regardless of ordering, an explicit DPI setting overrides the OutputQuality setting
Dim pagesToPrint As PageSet = New PageSet(1, doc.GetPageCount(), PageSet.Filter.e_all)
Try
Print.StartPrintJob(doc, sPrinter, doc.GetFileName(), “”, pagesToPrint, printerMode, Nothing)
bResult = True
Catch ex As Exception
Console.WriteLine(“Failed attempt in StartPrintJob for file '” + sPDFFile + "’. Exception message: " + ex.Message)
End Try
doc.Close()
Return bResult
End Function