Hi Eric,
Thank you for your interest in Syncfusion Products.
We can able to convert PdfDocument into PdfLoadedDocument, please use the code snippet below.
MemoryStream pdfGenerated = new MemoryStream();
PdfDocument.Merge(doc, dobj);
doc.Form.Flatten = true;
doc.Save(pdfGenerated);
doc.Close(true);
PdfLoadedDocument ldDoc = new PdfLoadedDocument(pdfGenerated);
Please let us know if you need any further assistance.
Thanks,
Karthikeyan.C
HI Eric,
Thank you for your interest in Syncfusion Products.
We can able to import and export the XFDF data to Pdf forms please use the below code snippet:
Exporting
PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
PdfLoadedForm form = doc.Form;
MemoryStream stream = new MemoryStream();
form.ExportData(stream, DataFormat.XFdf, "SourceForm.pdf");
Importing
PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
PdfLoadedForm form = doc.Form;
form.ImportData("ImportData.XFdf",DataFormat.XFdf, false);
doc.Save("Import.pdf")
Please refer the below link to fill the PDF from fields manually.
http://asp.syncfusion.com/Windows/demos/reporting/pdf/User%20Interaction/Form%20Fill/Sample.aspx
Please let us know if you have any concern.
Thanks,
Karthikeyan.C
form.ImportData("ImportData.XFdf",DataFormat.XFdf, false);
// Load the existing form
PdfLoadedForm form = doc.Form;
// Load the FDF file
FileStream stream = new FileStream("ImportFDF.xfdf", FileMode.Open);
// Import the FDF stream
form.ImportDataXFDF(stream, true);
We have created the sample for your reference in the below link:
http://www.syncfusion.com/downloads/support/forum/115319/ze/xdf_file_import-842004607
Please try this and let us know if you have any further assistance.
Regards,
Abirami.