empira / PDFsharp

PDFsharp and MigraDoc Foundation for .NET 6 and .NET Framework
https://docs.pdfsharp.net/
Other
492 stars 114 forks source link

Inability to correctly save dynamic XFA documents #109

Open IsaSlu opened 5 months ago

IsaSlu commented 5 months ago

PDFsharp does not appear able to correctly edit dynamic XFA documents. This is a major use case for anyone stuck with government forms.

I can go into the /XFA elements and change the datasets to include updated XML. This almost works. The trouble is when I reopen the document in Acrobat the data is there but no longer editable. This is not a document flattening issue, instead it probably relates to how document signing functions are triggered or managed within the PDF structure. I'm not certain due to my limited knowledge of PDF internals.

It seems I'm not the only one who's fallen into this. Here's a couple things I found while researching my issue:

Is there incremental save functionality in PDFsharp? Is that what's needed to make this work?