Поля удаляются при сохранении в PDFsharp - PullRequest
0 голосов
/ 13 марта 2019

У меня есть форма , которая была заполнена в Adobe Acrobat, при сохранении ее в PDFsharp все значения в полях будут удалены.

Я пытался добавить NeedAppearances Elements, но это не помогло. Любое решение?

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
...