最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Convert Livecycle dynamic fillable PDF to static fillable PDF (not to flattened PDF) - Stack Overflow

programmeradmin0浏览0评论

I have this unique situation where I need to convert the dynamic forms (XFA PDF) created by Livecycle ES4 Forms Designer into static forms (normal PDF).

Please note that as mentioned in other posts and forums, 1. I used a print driver to save the livecycle form as PDF but that expectedly flattens the file i.e. none of the PDF fields remain as readable. 2. Used JavaScript to make all the fields "read only" but that will still keep the format of the form as dynamic PDF and not static PDF.

In my case I do not want to flatten the form, I just want a non-dynamic PDF that will be non-interactive like the ones created in Acrobat. Is there any solution for that at a click of a button in LiveCycle using JavaScript?

Example-

Step 1 - Consider that a 'Contact Details' form is created in Adobe Livecycle. A user opens this form in Adobe Reader and sees Contact #1 box. The user then creates another 2 Contact Boxes by using the 'Add Contact' button (see the attached screenshot).

  • Note: Structure/layout of the Form will be changed if Add/Remove buttons or the Checkbox is clicked because this is a dynamic form.

Step 2 - Now the user should be able to save this form as a static PDF (not a Livecycle document) where the structure/layout of the form is fixed (i.e. add/remove buttons or the checkbox cannot do any change in the layout) but the fields of the form should be editable in the newly saved version.

How can the step 2 be achieved?

UPDATE:
I found one manual way -

  1. Convert Livecycle PDF to a flattened PDF by using a Print as PDF feature.
  2. Open Adobe Acrobat, go to Create --> Create Form --> select "From existing Document" --> upload the flattened PDF you created in the 1st step.
  3. Acrobat will detect the form fields. Save that as a fillable static PDF.

I noticed that the structure, fonts, data were preserved during these steps.

Customers obviously will not perform the above steps. So, I am trying to get an answer on how to do these steps automatically at a click of a button from the Livecycle PDF document.

Is there any API/plugin to do this automatically?

I have this unique situation where I need to convert the dynamic forms (XFA PDF) created by Livecycle ES4 Forms Designer into static forms (normal PDF).

Please note that as mentioned in other posts and forums, 1. I used a print driver to save the livecycle form as PDF but that expectedly flattens the file i.e. none of the PDF fields remain as readable. 2. Used JavaScript to make all the fields "read only" but that will still keep the format of the form as dynamic PDF and not static PDF.

In my case I do not want to flatten the form, I just want a non-dynamic PDF that will be non-interactive like the ones created in Acrobat. Is there any solution for that at a click of a button in LiveCycle using JavaScript?

Example-

Step 1 - Consider that a 'Contact Details' form is created in Adobe Livecycle. A user opens this form in Adobe Reader and sees Contact #1 box. The user then creates another 2 Contact Boxes by using the 'Add Contact' button (see the attached screenshot).

  • Note: Structure/layout of the Form will be changed if Add/Remove buttons or the Checkbox is clicked because this is a dynamic form.

Step 2 - Now the user should be able to save this form as a static PDF (not a Livecycle document) where the structure/layout of the form is fixed (i.e. add/remove buttons or the checkbox cannot do any change in the layout) but the fields of the form should be editable in the newly saved version.

How can the step 2 be achieved?

UPDATE:
I found one manual way -

  1. Convert Livecycle PDF to a flattened PDF by using a Print as PDF feature.
  2. Open Adobe Acrobat, go to Create --> Create Form --> select "From existing Document" --> upload the flattened PDF you created in the 1st step.
  3. Acrobat will detect the form fields. Save that as a fillable static PDF.

I noticed that the structure, fonts, data were preserved during these steps.

Customers obviously will not perform the above steps. So, I am trying to get an answer on how to do these steps automatically at a click of a button from the Livecycle PDF document.

Is there any API/plugin to do this automatically?

Share Improve this question edited Feb 19, 2016 at 1:22 ElevatedLyf asked Jan 26, 2016 at 7:28 ElevatedLyfElevatedLyf 1161 gold badge2 silver badges8 bronze badges 8
  • The result of saving as a "static form" in the save dialog of the designer is not what you're searching for? – Jan Slabon Commented Jan 26, 2016 at 8:49
  • Hey nope.. the end users using the form will not use LiveCycle.. They will use Adobe Reader and I believe that Reader cannot do this conversion. – ElevatedLyf Commented Jan 26, 2016 at 11:46
  • 1 Maybe you should add example documents (current and excepted) to your question. For me a flattened document is a non-interactive one. So I'm unsure what result you expect and what you have. – Jan Slabon Commented Jan 26, 2016 at 16:40
  • I have added a sample and tried to explain the question again. Hope that works. – ElevatedLyf Commented Jan 27, 2016 at 4:34
  • 1 well, if not with adobe reader, then how about a button on the form that will have JavaScript that calls "some logic" to convert the document to static PDF? Any clue for that "some logic"? :) – ElevatedLyf Commented Jan 27, 2016 at 23:20
 |  Show 3 more ments

3 Answers 3

Reset to default 1

Found one possiblity: using PDFCreator and acrowrap tool to convert from PDF XFA to PDF 1.4.

Converting from a dynamic form to Acroform within Reader is not going to be possible.

It seems to me that you could add a button within your form that disables all of the "Add Contact" functionality, and this would achieve the same result in a much simpler way.

Looked to do this in order to be able to save a livecycle PDF once filled out. I was able to do it in Acrobat DC by using Save as other > Reader extended PDF. Resulting form is not editable as a form, but form and contents are saveable by Reader.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论