Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

javascript acrobat

Explorer ,
Mar 13, 2019 Mar 13, 2019

¿Cómo puedo coger (seleccionar) los campos de un formulario PDF y copiarlos luego en otro PDF distinto ?

muchas gracias

TOPICS
Acrobat SDK and JavaScript , Windows
850
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 13, 2019 Mar 13, 2019

Select the fields and copy and paste.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 14, 2019 Mar 14, 2019
LATEST

hola

gracias por responder.

Pero era haciendo un script.

Un saludo

Eduardo

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 13, 2019 Mar 13, 2019

You posted in the JavaScript forum. Does that mean you want to do it with a script? If so, the easiest way is to use the Replace Pages command, as copying the fields directly is not possible. Alternatively you can collect their properties from the source document to a global variable and then recreate them in the target document. Doing so will remove all Actions and other settings like Format, Validate, Calculate, etc., though.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 13, 2019 Mar 13, 2019

You could open both forms in Acrobat and then use the "Prepare Form" tool on each PDF to edit the forms by cutting and copying the fields between the 2 forms. Or  you could use the "Organize Pages" tool to merge the 2 forms into one form, then use the "Prepare Form" tool to move the form fields as needed and delete the unwanted form fields and unwanted pages. Note that the second method will copy over all document level scripts that may need to adjusted.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 13, 2019 Mar 13, 2019

Another way could be to export the PDF you want information from, as a FDF file, then import the FDF file into the PDF you want to insert the information to. There is a programmable way of doing this, if needed.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 13, 2019 Mar 13, 2019

That doesn't create fields, though, it only transfers data to fields that already exist.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 13, 2019 Mar 13, 2019

That would only copy the values of the fields but not the fields.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 13, 2019 Mar 13, 2019

I would use CTRL + click to select all of the field you want to copy, then paste them in the other document

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 13, 2019 Mar 13, 2019

You still need to open the form tool. Also if there are document level functions, they will not be copied. Examples would include rounding calculations, validating date strings conversion to date objects and error trapping when acessing a field object.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines