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

Creating PDF, Need to copy form and text entries to clipboard

Explorer ,
Aug 07, 2016 Aug 07, 2016

Copy link to clipboard

Copied

So I am creating a PDF from a docx  Acrobat already detected all the fields, but what i need to do is be able to copy the form and the entered text to the clipboard. However I am limited on knowledge. If someone could help me out, that would be great. So for an example:

the form has Question 1:

What is your name?

Then the user answers in the text field:

John Doe

the form and text box format would be

What is your name? John Doe

I need to be able to copy  Both the form question and the text box answer  - inline to the clipboard in order to paste it in another program---say word for instance.

TOPICS
Acrobat SDK and JavaScript , Windows

Views

855
Translate

Report

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 ,
Aug 08, 2016 Aug 08, 2016

Copy link to clipboard

Copied

That's not possible to do in a single operation, since the values of the form fields and the static text exist on different "layers" of the PDF file. What you can do, though, is flatten the file first, which will convert the form fields to static text. Then you will be able to select everything at once and copy it. At that point you can simply close the file without saving it and it will be back to its original state.

Votes

Translate

Report

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 ,
Aug 08, 2016 Aug 08, 2016

Copy link to clipboard

Copied

Is it possible to have the user entered fields, then click a button that

will take the form questions and the user entered information from the rich

text format fields and paste it into another text field in the appropriate

format then have another button to copy that text field information so that

i can paste it into another program.

Votes

Translate

Report

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 ,
Aug 08, 2016 Aug 08, 2016

Copy link to clipboard

Copied

Copying the answers and questions to a single field is possible (but you'll need to hard-code the questions into the script that does it), but copying the final value into the clipboard is not.

Votes

Translate

Report

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 ,
Aug 08, 2016 Aug 08, 2016

Copy link to clipboard

Copied

Im confused because i was looking around and I found this link

<http://www.javascriptkit.com/javatutors/copytoclipboard.shtml> that seems

to explain how to do it but I do not really understand it. Can you help me

to understand why, What I am trying to do is not possible?

Sean

Votes

Translate

Report

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 ,
Aug 08, 2016 Aug 08, 2016

Copy link to clipboard

Copied

The code in that link might work in some browsers, but it won't work in Acrobat/Reader. Long ago it was possible to use a script to copy text to the clipboard in Acrobat/Reader, but this security hole was closed.

Votes

Translate

Report

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 ,
Aug 08, 2016 Aug 08, 2016

Copy link to clipboard

Copied

So is there anyway to achieve what i am trying to do?

On Mon, Aug 8, 2016 at 11:44 AM, George_Johnson <forums_noreply@adobe.com>

Votes

Translate

Report

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 ,
Aug 08, 2016 Aug 08, 2016

Copy link to clipboard

Copied

It's possible to add the Copy command to the WhiteList of allowed commands, but it requires a registry tweak. You might also need to use the SelectAll command to select the text in the field. I've played around with it a bit and it's very tricky to get it to work, but it sometimes does work...

Votes

Translate

Report

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 ,
Aug 08, 2016 Aug 08, 2016

Copy link to clipboard

Copied

What I would do is use app.response or a custom dialog to copy the text and present it to the user, and the user could easily press Ctrl+C to manually copy the text to the clipboard.

Votes

Translate

Report

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 ,
Aug 09, 2016 Aug 09, 2016

Copy link to clipboard

Copied

LATEST

So George how would I do the app.response for this? I will have multiple fields to fill out

Votes

Translate

Report

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