Printing PDF files in Xamarin Pdf Viewer (SfPdfViewer)
4 Dec 2019 / 1 minute to read
PDF Viewer allows printing the loaded PDF documents using the Print button in the built-in toolbar.
The Print operation could be performed using the following APIs programmatically.
//Print the PDF
pdfViewerControl.Print();
//Print the PDF with given file name
pdfViewerControl.Print(string filename);
The following example demonstrates the usage of print operation within a button click event.
private void Button_Clicked(object sender, EventArgs e)
{
//Print the PDF
pdfViewerControl.Print("PdfFileName.pdf");
}
NOTE
The default file name of the printed document will be “SavedDocument.pdf”.
Was this page helpful?
Yes
No
Thank you for your feedback!
Thank you for your feedback and comments. We will rectify this as soon as possible!
An unknown error has occurred. Please try again.
Help us improve this page