title: How to save changes made on the pdf file using iText on ASP.NET?
body: <p>I am creating a web application that automates our work with PDFs. </p>
  
  <p>I am currently testing iText7 on .NET to test if it fits our needs.</p>
  
  <p>The main problem right now is saving modifications made to the file from a web page. </p>
  
  <p><strong>Edit</strong></p>
  
  <p>The scenario is following: we work with hundreds of PDF forms daily. We fill them up, modify, save, print, etc. The tool we are currently using for that is too complex. Thus, we want to simplify. </p>
  
  <p>I tested that I can fill-up the form from the database and extract information from the fields. However, after filling up we may need to change some values in the form manually, save changes and write back to database. </p>
  
  <p>The simplest solution is of course fill up, download the file, edit and save locally, re-upload the file onto the server, and then extract values out of the updated form and fill-up the database. It works, but it includes too much manual work such as downloading and re-uploading. My clients want it automated.</p>
  
  <p>The other approach I tried was showing the pdf document in my web app, edit, and save all modifications with a button (on a web page). But couldn't make my button save the updated pdf document. I showed the file in MVC view like this:
  <code>object data="@Url.Action("ShowPDFwithButton", "PdfTemplates", new { id = Model.FilledForm.id })"type="application/pdf">/object></code></p>
  
  <p>The third approach I came up with is to add a new page with a 'Save' button on it to my filled form. I wanted that button in pdf itself to save my modifications. After that I would just extract the values of the saved form and update the database. I tried this code to add some functionality to my 'Save' button, but can't understand how to make it save changes and/or send the updated file to my action controller:<code>button.SetAction(PdfAction.CreateSubmitForm("/PdfTemplates/SavePdf/" + pdfMetadata.id, null,PdfAction.SUBMIT_EXCL_F_KEY));</code></p>
  
  <p>I would appreciate if anyone could help making the second and third approach work. Or maybe offer other approaches.</p>