How to supports silent printing page range in WPF PDFViewer?
WPF PDFViewer does not support to Silent printing particular page range. However, you can achieve this by loading a PDF Document in the PdfLoadedDocument and importing the necessary page range to be printed to a new PdfDocument. Then the resultant document is loaded into the PdfDocumentView and you can print the particular page range of the document.
You can refer to the following code example to print document in particular page range.
C#
PdfDocumentView pdfdocumentview = new PdfDocumentView(); //Load the document in PdfLoaded document PdfLoadedDocument loadeddocument = new PdfLoadedDocument("../../Data/Manual.pdf"); //create an instance of PdfDocument PdfDocument document = new PdfDocument(); //Import the page you need to print to the pdfdocument document.ImportPageRange(loadeddocument, from, to); //save the document in a memory stream MemoryStream stream = new MemoryStream(); document.Save(stream); //load the pdfdocumentview with the memory stream pdfDocumentview.Load(stream); //Prints selected range of pages pdfDocumentview.Print();
I hope you enjoyed learning about how to supports silent printing page range in WPF PDFViewer.
You can refer to our WPF PDF Viewer feature tour page to know about its other groundbreaking feature representations. You can also explore documentation to understand how to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!