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

Is there a Javascript to update a PDF attachment?

Community Beginner ,
Jan 28, 2016 Jan 28, 2016

I have a  form designed in Adobe Acrobat DC that allows the user in Reader to attach a document that is named ApplicantReport.pdf.  The user will need to save the document (which has a button that allows them to do that) and then reset and fill out the next form.  In a separate program, this same user is changing and saving over the file named ApplicantReport.pdf with current info.  As the user resets the form, I need the UPDATED ApplicantReport.pdf to attach to the current form.

Is there a javascript that will update the current attachment?

If not, is there a javascript that will DETACH the current attachment in the reset process so the user can re-attach the current version of ApplicantReport.pdf?

TOPICS
Acrobat SDK and JavaScript
521
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 ,
Jan 29, 2016 Jan 29, 2016

Can you determine the fie and location that was used add an attachment to a PDF?

Would you always be able to access that file?

I believe both answers are "N0".

Attachments not have a property available to JavaScript that provides the source location for the attached file.

Not all computers are always attached to the Internet and most do not share their full content when attached to the Internet.

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 Beginner ,
Jan 29, 2016 Jan 29, 2016

Yes, the file location for the attachment will be the same every time and will be on the users own personal hard drive (not on line).  The location of the file is accessible in that location until the file is submitted to me via email.  

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 ,
Jan 29, 2016 Jan 29, 2016
LATEST

If this form is for a single user, it might be possible. If it is for more than one user, you would have to make sure all users have the file in the very exact location, that eliminates the "My Documents" since the real location for that directory has the user's login name as part of the path and may not always be located on the C drive.

You would also have to be able to identify the attached file attachment by its JavaScript or internal name. This is easy if there is only one annotation.

It is not that hard to just delete the attachment and add a new one.

If any user is using Adobe Reader this becomes more complex since JavaScript in Reader cannot destroy comments with without special rights.

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