Articles in this section
Category / Section

How to print the PDF document containing form fields

You can print the PDF document containing the form fields by flattening the form fields as shown in the below code snippet.

C#

PdfViewerControl viewer = new PdfViewerControl();
 
//Create new instance of PdfLoadedDocument with the form field document
PdfLoadedDocument loadedDocument = new PdfLoadedDocument(@"..\..\Data\Form.pdf");
            
//Flatten the form fields and resaving
loadedDocument.Form.Flatten = true;
loadedDocument.Save();
 
//Load the resaved document in viewer
viewer.Load(loadedDocument);
 
// Initialize print dialog and silent print the document
PrintDialog dialog = new PrintDialog();
 
dialog.Document = viewer.PrintDocument;
dialog.Document.Print();

 

Sample:

https://www.syncfusion.com/downloads/support/directtrac/general/ze/Silent_Printing-622917466

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied