We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Printing PDF Documentt problems

Hi,
I readed your documents on "Printing Pdf Document" and I note that "Syncfusion.PdfViewer.Windows.dll" reference not exist while exist "Syncfusion.PdfViewer.WPF.dll" reference.
Your PrintDialog is System.Windows.Controls.PrintDialog or System.Windows.Forms.PrintDialog?
If is it the first, there is not Document property while if is it the second, don't accept a System.Windows.Documents.FixedDocument.
And again the PdfDocumentView haven't a dispose() method.

This is your code in "Documents":

To print a PDF document, the following assemblies have to be added as references to the project.

  1. Syncfusion.Compression.Base.dll
  2. Syncfusion.Pdf.Base.dll
  3. Syncfusion.PdfViewer.Windows.dll

The following code snippet illustrates how to print a PDF document.

"PdfDocumentView viewer = new PdfDocumentView();

//Load the PDF document

viewer.Load("Input.pdf");

//Initialize print dialog.

PrintDialog dialog = new PrintDialog();

dialog.AllowPrintToFile = true;

dialog.AllowSomePages = true;

dialog.AllowCurrentPage = true;

dialog.Document = viewer.PrintDocument;

//Print the PDF document

dialog.Document.Print();

//Dispose the viewer

viewer.Dispose();"


If I use l'async method "await viewer.LoadAsync(stream);" it not wait that the loading is complete and PdfDocumentView return a null PrintDocument

Regards

1 Reply

AK Ayswarya Krishna Kumar Syncfusion Team August 14, 2017 12:12 PM UTC

Hi Fabio, 
A support incident to track the status of the reported issue has been created under your account. Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents 
Regards, 
Ayswarya 


Loader.
Up arrow icon