PDF/A error

PDF/A error: JavaScript or a launch action is present

PDF/A forbids executable content — JavaScript, launch actions and other actions with side effects. What triggers this and how to remove it.

The document contains an action PDF/A does not allow: JavaScript, a launch action, or another action type whose behaviour depends on the viewer and the machine. Remove the actions and re-save; nothing about them can be preserved in a conformant file.

ISO 19005-1 clause 6.6Actions

The Actions check group covers 6.6.x action types and additional actions. The exact sub-clause is reported on the issue itself when the validator raises it.

What causes it

  • Form field validation or calculation scripts, which are JavaScript.
  • A "print this document" or "submit this form" button wired to an action.
  • A launch action opening an external file or application.
  • Document-level scripts added by a form designer, sometimes present in a template long after anyone used them.

How to fix it

  1. Remove the scripts and actions at the source, then re-export. Interactive behaviour is not something an archival document is meant to have.
  2. Flatten interactive form fields to static page content, which removes their scripts along with their interactivity.
  3. Convert the document, which strips the offending actions.

Frequently asked

Are ordinary hyperlinks a problem?

Link annotations to a URI are not the issue this check is about; it targets actions that execute something. A document whose meaning depends on an external URL still resolving is a separate archival risk worth thinking about.

Why is JavaScript forbidden?

Because it makes the document's behaviour depend on a scripting engine that may not exist, may behave differently, or may be disabled. An archival document has to be a record, not a program.

Check your own document
The validator runs the same engine in your browser and names every failing check. The file is never uploaded.

Related failures

Embedded files
PDF/A-1 forbids file attachments. Which parts allow them, and what to do with a document that has one.
Missing appearance stream
Every annotation in a PDF/A file needs a normal appearance stream so its rendering does not depend on the viewer. How to add one.