Skip to main content
JR Boulay
Community Expert
Community Expert
Mar 24, 2017 6:53 PM UTC
Question

exportDataObject & Attach File comment tool

Hi experts.

I know how to use

this.exportDataObject({cName: "myFile.pdf", nLaunch: 2});

to open an attachment.

It works fine with attachments attached using the Attachments pane, but when I want to open an attachment attached using the Attach File comment tool I always get this error mesage: TypeError: Invalid argument type.

What must I do to JavaScript-open an attachment attached using the Attach File comment tool?

I need this to works with Acrobat Reader (11 & DC).

Thank You

This topic is closed to new replies. Start a new post to keep the conversation going.

7 replies

JR Boulay
Community Expert
JR BoulayCommunity ExpertAuthor
Community Expert
Mar 25, 2017 10:48 AM UTC

I found a workaround.

Instead of displaying a button for opening each attachment, I'd placed the attachment icon instead.

So users can double-clic the icon for opening attachments.

It was a challenge to set the precise position for each icon, but it's OK now.

Translate
Acrobate du PDF, InDesigner et Photoshopographe
Participant
Jul 11, 2022 6:31 AM UTC

Hola JR Boulay, ¿podrías compartir tu archivo PDF?. Intento hacer un formulario igual al tuyo pero me estoy volviendo loco con el código y no consigo que funcione. ¿Serías tan amable?. Gracias de antemano. javero25@gmail.com

Translate
Joel Geraci
Community Expert
Community Expert
Mar 24, 2017 9:54 PM UTC

It's not the JavaScript method, it's the Acrobat UI. The UI will, as a convenience, show page level attachments in the same pane as document level attachments. They aren't stored in the PDF in the same way though.

Translate
try67
Community Expert
Community Expert
Mar 24, 2017 8:05 PM UTC

AFAIK, it's not possible to do that.

Translate
JR Boulay
Community Expert
JR BoulayCommunity ExpertAuthor
Community Expert
Mar 24, 2017 9:16 PM UTC

If ever a bomb exploded at the guy who (not) implemented this JavaScript method in PDF format I would make a good suspect ...

Thank you try67.

Translate
Acrobate du PDF, InDesigner et Photoshopographe
Joel Geraci
Community Expert
Community Expert
Mar 24, 2017 9:58 PM UTC

JR:

You do understand that the fact that you used the words "bomb" and "exploded" in this forum means that we're now all going to have to uninstall Acrobat from our laptops before boarding a flight. Thanks... really.

Translate