Highlighted

Remove executable code from PDF

New Here ,
Jun 12, 2020

Copy link to clipboard

Copied

Hi there, I have a series of pdf files that I need a way to figure out if there is executable code inside the files.  Do you know of a good method to do this on a batch level?

Topics

How to

Views

297

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

Remove executable code from PDF

New Here ,
Jun 12, 2020

Copy link to clipboard

Copied

Hi there, I have a series of pdf files that I need a way to figure out if there is executable code inside the files.  Do you know of a good method to do this on a batch level?

Topics

How to

Views

298

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
Adobe Community Professional ,
Jun 12, 2020

Copy link to clipboard

Copied

You can use the Preflight tool or the PDF Optimiser (Save as Other).

 

Acrobat_kW0JY9Nfho.pngAcrobat_cUYcG28fRR.png

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...
New Here ,
Jun 12, 2020

Copy link to clipboard

Copied

Hmm the pdf is still being rejected.  Is there a way to extract the contents that show the code?

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...
Adobe Employee ,
Jun 12, 2020

Copy link to clipboard

Copied

Exactly what reason is being give by whom for the file being rejected?

 

JavaScript isn't the only possibility here. Perhaps whatever is examining the PDF file is looking for any embedded attached files. You can get rid of those via the optimizer as follows:

 

2020-06-12_11-46-25.png

 

- Dov Isaacs, Principal Scientist, Adobe

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...
New Here ,
Jun 12, 2020

Copy link to clipboard

Copied

Docments with executable code is not permitted. 

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...
Adobe Employee ,
Jun 12, 2020

Copy link to clipboard

Copied

Exactly who or what is claiming that you still have executable code in your PDF file? Apparently, executable code can mean any number of things to different persons or tools.

 

- Dov Isaacs, Principal Scientist, Adobe

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...
New Here ,
Jun 12, 2020

Copy link to clipboard

Copied

It's a court system. So the best way to i think is editing or removing the executable or what they define executable code using vbs but i won't go down that route unless i can't do it from the UI.

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...
Most Valuable Participant ,
Jun 12, 2020

Copy link to clipboard

Copied

The entire thing is pointless unless you know what they mean by "executable code". It's obviously not what we mean, or the methods described above would have taken care of it already.

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...
New Here ,
Jun 12, 2020

Copy link to clipboard

Copied

But wouldn't there be a static piece of content that i can parse out from a batch process? executable code must be limited to links, headers info. Something i just can't be my finger on it. 

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...
Most Valuable Participant ,
Jun 12, 2020

Copy link to clipboard

Copied

Assuming "executable code" means "JavaScript code" it can be located at the doc-, field-, page-, bookmark- and link-levels, and in multiple locations under each one. But the Preflight action mentioned above will remove all of those.

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...
New Here ,
Aug 31, 2020

Copy link to clipboard

Copied

Thanks for the fix. The windows don't look exactly like this in Acrobat DC, but I was able to go into the Preflight and get rid of the java script, which did the trick for uploading to the Ninth Circuit Court of Appeals' ECF system.

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...
Resources
One Stop Solution for Acrobat
Edit a PDF