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

Remove Attached File

Guest
Jun 16, 2016 Jun 16, 2016

Hello All,

I have a form that the end user can attach multiple files to the form and that is annotated into a list box. I know how to remove all the attachments and already have that set on a button. What I am wanting to do (and just finding no way to do it) is select a single file from the list box and remove just that file when the button is clicked.

Any suggestions would be wonderful.

Thank you!

TOPICS
Acrobat SDK and JavaScript , Windows
568
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 ,
Jun 16, 2016 Jun 16, 2016

Attachments are "data objects", and you can remove one using the Doc.removeDataObject() method: Acrobat DC SDK Documentation - Doc.removeDataObject()​

All you need to do is pass in the name of your data object and it should be gone.

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
Guest
Jun 16, 2016 Jun 16, 2016

what do you mean pass in the name?

I am trying to teach myself as i go.

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 ,
Jun 16, 2016 Jun 16, 2016
LATEST

You use the attachment name for the paramrter used by the method.

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