Edit the pdf embedded in the browser and save the pdf directly on the server

I have this workflow.

  • Download the pdf file containing the form fields in the browser (pdf in iframe or div).
  • User fills it
  • Click the submit button (in another div) to save the PDF file.

What I would like to do in # 3 is to collect all the data associated with the form fields and save the data in a database table. I do not want the user to save the pdf file on his local computer and upload it to the server. I would like to make it more convenient.

I am going to use Java / JSP / Servlet on the server side. I looked at itext, which seems to be popular / well known for processing a PDF file, but itext seems to be used to create / edit a PDF document, but I'm not sure if there is a way to have a function capable of editing a pdf file embedded in browser, and save it to the database.

Is there any adobe software that provides some function that I can insert some kind of script that can capture the user? I know that PDF is not a scripting language interface, but I'm just asking.

I was going to create an HTML form that looks like this PDF file and fills it in PDF when the user clicks the submit button, but, as I said, I would like to make it more convenient.

, -, , .

+4
1

: PDF AcroForm, submit_me.pdf:

enter image description here

, :

  • POST , , PDF HTML,
  • FDF , PDF, , ,
  • XFDF XML Forms Data Format, XML- .
  • RESET reset .

SubmitForm , . , , .

:

  • POST GET, ,
  • PDF ( + ) , , Adobe Acrobat . , - Adobe Reader,
  • ...

, , ShowData. , .

POST:

personal.loginname=jdoe&personal.name=John+Doe&personal.password=test&personal.reason=reason&post.x=29&post.y=7

, , . , .

FDF:

%FDF-1.2
%âãÏÓ
1 0 obj
<</FDF<</Fields[<</T(FDF)>><</Kids[<</T(loginname)/V(jdoe)>><</T(name)/V(John Doe)>><</T(password)/V(test)>><</T(reason)/V(Reason)>>]/T(personal)>>]/ID[<EF0089E16ED50F11CB6057A700B9046E><1205D069D1D6AE37665B6FF7EEA65414>]>>/Type/Catalog>>
endobj
trailer
<</Root 1 0 R>>
%%EOF

XFDF:

<?xml version="1.0" encoding="UTF-8"?>
<xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve"
><f href="http://itextpdf.com:8180/book/submit_me.pdf"
/><fields
><field name="XFDF"
/><field name="personal"
><field name="loginname"
><value
>jdoe</value
></field
><field name="name"
><value
>John Doe</value
></field
><field name="password"
><value
>test</value
></field
><field name="reason"
><value
>Reason</value
></field
></field
></fields
><ids original="EF0089E16ED50F11CB6057A700B9046E" modified="1205D069D1D6AE37665B6FF7EEA65414"
/></xfdf
>

. ISO-32000-1, PDF. : PDF, , , , , PDF .

+3

All Articles