Ghost JavaScript and ghost Document Action enigma

Adobe Community Professional ,
Sep 21, 2018

Copy link to clipboard

Copied

Hi experts.

Today I received a strange PDF document, when it is opened it automatically launch the Print command.

So I tried to remove this unwanted Action with Acrobat Pro DC.

But I cannot find it, it can only be seen in JavaScript : All JavaScript, and it's labelled "Belong to: Document-Actions : Document Open" (see screengrabs), and it's not a Page Action.

I never heard about a Document Action named "Document Open", I cannot find it in the Acrobat UI nor in the SDK JavaScript Reference…

The only clue I have is the document creator : Skia/PDF

Did I mess something obvious or is it a real mystery?

You can download this PDF here: Shared Files - Acrobat.com

Capture_065.png

Capture_062.png

Capture_060.png

Capture_063.png

Capture_064.png

Capture_066.png

TOPICS
Acrobat SDK and JavaScript

Views

344

Likes

Translate

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

Ghost JavaScript and ghost Document Action enigma

Adobe Community Professional ,
Sep 21, 2018

Copy link to clipboard

Copied

Hi experts.

Today I received a strange PDF document, when it is opened it automatically launch the Print command.

So I tried to remove this unwanted Action with Acrobat Pro DC.

But I cannot find it, it can only be seen in JavaScript : All JavaScript, and it's labelled "Belong to: Document-Actions : Document Open" (see screengrabs), and it's not a Page Action.

I never heard about a Document Action named "Document Open", I cannot find it in the Acrobat UI nor in the SDK JavaScript Reference…

The only clue I have is the document creator : Skia/PDF

Did I mess something obvious or is it a real mystery?

You can download this PDF here: Shared Files - Acrobat.com

Capture_065.png

Capture_062.png

Capture_060.png

Capture_063.png

Capture_064.png

Capture_066.png

TOPICS
Acrobat SDK and JavaScript

Views

345

Likes

Translate

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
Sep 21, 2018 0
Most Valuable Participant ,
Sep 21, 2018

Copy link to clipboard

Copied

It's just the internal name of that doc-level script. I've seen it happen in the past that such scripts that were applied using external tools don't show up in the Document JavaScripts window (probably because they were not defined completely correctly), but they still execute when the file is opened.

Likes

Translate

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
Reply
Loading...
Sep 21, 2018 0
Adobe Community Professional ,
Sep 23, 2018

Copy link to clipboard

Copied

It's just the internal name of that doc-level script.

Did you try to remove this script?

I cannot: I can delete it and save the PDF, and when I reopen the PDF it's still here…

Likes

Translate

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
Reply
Loading...
Sep 23, 2018 0
Adobe Community Professional ,
Sep 23, 2018

Copy link to clipboard

Copied

JR_Boulay  wrote

It's just the internal name of that doc-level script.

Did you try to remove this script?

I cannot: I can delete it and save the PDF, and when I reopen the PDF it's still here…

The file without the script:

Shared Files - Acrobat.com

Likes

Translate

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
Reply
Loading...
Sep 23, 2018 0
Adobe Community Professional ,
Sep 21, 2018

Copy link to clipboard

Copied

There is a document open action, but Acrobat has never provided a UI for setting an action for it. See the PDF Reference for more info (OpenAction).

Likes

Translate

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
Reply
Loading...
Sep 21, 2018 0
Adobe Community Professional ,
Sep 23, 2018

Copy link to clipboard

Copied

See the PDF Reference for more info

As you can see on the screengrab above, there is nothing about a "Document Open" action in the PDF Reference.

Likes

Translate

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
Reply
Loading...
Sep 23, 2018 0
Adobe Community Professional ,
Sep 23, 2018

Copy link to clipboard

Copied

Your screenshot shows the JavaScript API documentation, not the PDF specification.

in the 1.7 version of the spec, it’s in table 28

Likes

Translate

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
Reply
Loading...
Sep 23, 2018 0
Adobe Community Professional ,
Sep 23, 2018

Copy link to clipboard

Copied

It's been around for a long time, before forms and JavaScript were added to the spec. I know that it was supported for JavaScript placed there in Acrobat/Reader 4, not certain about before that. With JavaScript, it's not really needed since we can use document-level scripts to execute code on document open, but it was a sneaky way to hide code that we didn't want people messing with easily, as well as other types of actions. There was a malicious PDF (Peachy) that used this technique, and because it used OpenAction for which there's no UI in Acrobat for viewing/editing such actions, there was a lot of consternation.

Likes

Translate

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
Reply
Loading...
Sep 23, 2018 0
Adobe Community Professional ,
Sep 24, 2018

Copy link to clipboard

Copied

Thank you to all.

Now I am less ignorant.

Likes

Translate

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
Reply
Loading...
Sep 24, 2018 0