Hi,
We are unable to finish the project with our client due to the poor printing quality of the PDF's and the poor scaling of the PDF's.
I wish the error is an our side but we tried different settings with both available functions.
The API output of our print statements is completely unpredictable and somethime printing crashes.
I tried playing with the same code of my colleque Veerle but have the same pour results.
When printing the same document with Acrobat Reader the PDF document which is longer than an A4 is correctly sized to an A4.
With aspose we are unable to come to the same result.
Veerle sent you the original pdf file and code. We can't put the document in this forum as we may not publish our clients information to the whole internet community.
We are really stuck here. Can someone look into this as soon as possible?
Here is the code that I used during testing:
Private Sub PDFPrint(ByVal vsFinalDocument As String)
Dim loPdfPrinter As Aspose.Pdf.Kit.PdfViewer
Dim loPrinterSettings As New System.Drawing.Printing.PrinterSettings
Dim loPageSettings As New System.Drawing.Printing.PageSettings
Dim loPaperSize As System.Drawing.Printing.PaperSize
Dim loprinterresolution As New System.Drawing.Printing.PrinterResolution
Try
'loPrinterSettings.PrinterName = "Microsoft Office Document Image Writer"
'loPrinterSettings.PrinterName = "Adobe(PDF)"
loPrinterSettings.PrinterName = "\\Arcobe01\CanoniRC2880"
loPrinterSettings.PrintRange = Drawing.Printing.PrintRange.AllPages
'loprinterresolution.X = 600
'loprinterresolution.Y = 600
loPaperSize = New System.Drawing.Printing.PaperSize("A4", 827, 1169)
'loPageSettings.PrinterResolution = loprinterresolution
loPageSettings.PaperSize = loPaperSize
'loPageSettings.Margins.Left = 0
'loPageSettings.Margins.Top = 0
'loPageSettings.Margins.Right = 0
'loPageSettings.Margins.Bottom = 0
loPageSettings.Margins = New System.Drawing.Printing.Margins(0, 0, 0, 0)
loPdfPrinter = New Aspose.Pdf.Kit.PdfViewer()
loPdfPrinter.OpenPdfFile(vsFinalDocument)
loPdfPrinter.AutoResize = True
loPdfPrinter.AutoRotate = True
loPdfPrinter.Resolution = 300
loPdfPrinter.PrintPageDialog = False
'loPdfPrinter.PrintDocument()
loPdfPrinter.PrintDocumentWithSettings(loPageSettings, loPrinterSettings)
loPdfPrinter.ClosePdfFile()
loPdfPrinter.PrintLargePdf(vsFinalDocument, loPageSettings, loPrinterSettings)
Catch ex As Exception
End Try
End Sub