everyone just updated Syncfusion and Itextsharp library on Visual Studio 2022 and got some errors. before it worked for me well. will show your code.
codes are the following:
//Load the existing XFA form
FileStream loadStream = new FileStream(sourceXfaPath, FileMode.Open);
PdfLoadedXfaDocument loadedDocument = new PdfLoadedXfaDocument(loadStream);
PdfLoadedXfaForm loadedForm = loadedDocument.XfaForm;
FileStream exportStream = new FileStream(exportXfaXml, FileMode.Create);
//Export the XFA data
loadedForm.ExportXfaData(exportStream);
the error message is following
The type 'PdfLoadedXfaForm' exists in both `Syncfusion.Pdf.Base, Version=20.4460.0.44, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89` and `Syncfusion.Pdf.Portable`, Version=20.4200.0.44, Culture=neutral,
so, just tried adding some code Sycfusion.Pdf.Xfa.PdfLoadedXfaForm
.
but it still shows me the same error.