Files filled out with Adobe Acrobat Pro, will stripe out all fields when saved with PDF sharp,
Try it with PDF from link below.
https://drive.google.com/open?id=1rginr-O2aAPRU2bLvQ1xo32WuDWM09ynI tried adding NeedAppearances but that doesn't help
Code:
Private Sub PDFsharpSave(Path As String)
Dim Doc As PdfDocument = IO.PdfReader.Open(Path)
If Doc.AcroForm IsNot Nothing Then
If Doc.AcroForm.Elements.ContainsKey("/NeedAppearances") = False Then
Doc.AcroForm.Elements.Add("/NeedAppearances", New PdfSharp.Pdf.PdfBoolean(True))
Else
Doc.AcroForm.Elements("/NeedAppearances") = New PdfSharp.Pdf.PdfBoolean(True)
End If
Doc.Save(Path.Replace(".pdf", "_v2.pdf"))
End If
End Sub