PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Mon Dec 10, 2018 9:36 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Sun Mar 25, 2018 5:10 pm 
Offline

Joined: Sun Mar 25, 2018 5:02 pm
Posts: 1
I have just been playing with PDFSharp 1.50RC1 and its looking excellent!
I am using it to complete a PDF form which works well but when I open the output file there are two issues:

1. I receive a message saying "This document enabled extended features in Adobe Acrobat Reader"
2. The fields are no longer editable in Adobe Acrobat Reader after the document has been amended.

I know if another PDF .NET application that you have to open the document as APPEND to resolve the same error but I haven't been able to find a way to resolve it.

Has anyone else had this and maybe could help?
I have attached the code I am using below (which is pretty straight forward):

Private Sub PDFSharpFillForm()
Dim mypdfdocument As New PdfSharp.Pdf.PdfDocument
mypdfdocument = PdfSharp.Pdf.IO.PdfReader.Open("c:\open\form1.pdf", PdfSharp.Pdf.IO.PdfDocumentOpenMode.Modify)
Dim form As PdfSharp.Pdf.AcroForms.PdfAcroForm = mypdfdocument.AcroForm
If form.Elements.ContainsKey("/NeedAppearances") Then
form.Elements("/NeedAppearances") = New PdfSharp.Pdf.PdfBoolean(True)
Else
form.Elements.Add("/NeedAppearances", New PdfSharp.Pdf.PdfBoolean(True))
End If
Dim testField As PdfSharp.Pdf.AcroForms.PdfTextField = CType(form.Fields("P1_Crematorium"), PdfSharp.Pdf.AcroForms.PdfTextField)
testField.Text = "My Crematorium"
mypdfdocument.Save("c:\open\form1-PDFSharp.pdf")
End Sub

----------------------------------------------------------------------------------------------------------------------
ANOTHER .NET PDF Application resolved this by issuing the following command when opening the document (if it helps):

PdfStamper ps = new PdfStamper(pr, fs, '\0', true);


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group