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.
- Syncfusion.Compression.Base.dll
- Syncfusion.Pdf.Base.dll
- 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