Category / Section
How to view Form fields in the PDF document in PdfViewer control?
2 mins read
At present, Essential PdfViewer do not support viewing form fields or annotations present in the document. If PDF documents contains Form fields content. We have to flatten the Form fields before loading the document into PDFViewer control by setting the Form flatten value as true.
Code snippet to flatten the form fields.
C#
private void Form1_Load(object sender, EventArgs e) { //Create an instance PdfLoadedDocument and load the document contain form fields PdfLoadedDocument loadedDocument = new PdfLoadedDocument("C:/Temp/formfield.pdf"); //Set the flatten property for forms field as true loadedDocument.Form.Flatten = true; //Save the flatten document loadedDocument.Save(); //Load the flatten document into PDFViewer pdfViewerControl.Load(loadedDocument); }
Sample:
http://www.syncfusion.com/downloads/support/directtrac/general/FormFlatten1966188759.zip