1

We would like to present an editable PDF (form) to my user, in which we have already filled out some of the fields. The user should then fill the rest of the fields, using Adobe Reader through a browser, and then save/print the file.

Is there a way to do this?

I have tried using iTextSharp which lets me fill data into fields fine, but afterwards the file is "flattened" preventing any further editing.

I found a previous question [ Keep a pdf form editable after filling it with pdftk ] in which it is said not to be possible. However, after reading [ Placing current date into a text field of a PDF form using JavaScript ] I have a feeling that it may be possible to achieve using the Adobe JavaScript API.

Does anyone have any experience with this?

As an aside, our users will be working with Internet Explorer 9+.

Community
  • 1
  • 1
Kristian Vinther
  • 578
  • 2
  • 6
  • 15
  • possible duplicate of [PDF with fillable, saveable form using open-source software](http://stackoverflow.com/questions/11530421/pdf-with-fillable-saveable-form-using-open-source-software) – yms Jul 30 '12 at 13:39
  • Thank. I am currently investigating some of the suggestions made in the post you linked. – Kristian Vinther Aug 08 '12 at 10:26

1 Answers1

0

I'm sure you tried it already, but try calling out your stamper object, and set the Form flattening property to false. Forgive my c#, but it shouldn't be much trouble to convert if you even have to convert at all.

PdfStamper stamper = new PdfStamper(reader, new FileStream(fileName, 
FileMode.Create, FileAccess.ReadWrite));

stamper.FormFlattening = false;

If you have already done this, I'm not sure what to tell you, as I do not have enough information to determine any alternatives. I'm not entirely sure what the default form flattening property is set to if it is not explicitly referenced in code. Let me know if this worked out for you.

Cheers

Mike Varosky
  • 390
  • 1
  • 10
  • The OP said "(...)using Adobe Reader through a browser(...)" so this solution [will not work](http://stackoverflow.com/a/11530521/501196). – yms Aug 01 '12 at 19:30
  • I have tried using the FormFlattening = false, however, it doesn't work. I think that the modification to the file somehow disrupts the "digital signature" of the document, which is required by Adobe Reader in order to show editable fields. – Kristian Vinther Aug 08 '12 at 10:23
  • @MikeVarosky Correction: We actually got the stamper.FormFlattening = false to work. I don't know what went wrong at first, but now we have a wokring PDF form editor :D. – Kristian Vinther Nov 15 '12 at 08:34