Compressing PDF Files


Optional. Enable any of these values by adding it to the profile and setting it equal to "on."

discard-javascript-actions Removes JavaScript content. Blocks of JavaScript code can be added to a PDF to complete a function or calculate a value, such as a user’s age when that person enters his or her birth date in a form field.
discard-alternate-images Removes alternate versions of the same image found in the PDF document. A PDF document can be set up to specify alternate images, or multiple versions of one image within the same document. These images can be used to meet different needs. For example, a PDF could present one image with a lower resolution for display on a monitor, and an alternate image with a higher resolution to use when the PDF document is sent to a printer. These images can make a PDF document very large.  Today alternate images are rarely used.
discard-thumbnails Removes document thumbnails.  Thumbnail images are used to preview pages in a PDF document and appear in a panel on the left side of the viewer window.  A user could scroll through a series of thumbnails to find a page he or she is looking for.
discard-document-tags Removes document tags. Tags are sometimes added to PDF documents to provide  structural information to describe items such as headers and other content on a page. Tagging is generally used with a PDF document to meet accessibility requirements. For example, tags in a PDF document might be placed so that text, headings, footnotes, and other content in the document can be interpreted by a screen reading software tool.
discard-bookmarks Removes document bookmarks. Bookmarks make navigation easier.  They are typically presented as a Table of Contents, and are commonly attached to headings within the document. A user typically interacts with this Table of Contents to move directly to the part of the page where the bookmark is found.  And bookmarks can be used apart from a table of contents to mark a place in a PDF document to navigate to.
discard-output-intent Removes the document's output intent. The output intent is an entry in the PDF document OutputIntents array. The output intent is used to describe how the destination device for the document, most likely a printer, reproduces the colors in the document. Specifically, the output intent describes the ICC Color space to use for rendering the document. The ICC profile file is stored in the PDF document itself. If the output intent is present, rendering will be to that profile. PDF documents that are compliant with an ISO standard, like Graphics Exchange (PDF/X), Archive (PDF/A), and Engineering (PDF/E), often have an output intent set.

As the ICC profile can be quite large, you might want to remove it to reduce the size of the PDF document, if you don’t have plans to print the document in the future. But if it is important to preserve color fidelity for your application, it should not be removed.

. . .
    "objects": {
        "discard-javascript-actions": "off",
        "discard-alternate-images": "on",
        "discard-thumbnails": "off",
        "discard-document-tags": "off",
        "discard-bookmarks": "off",
        "discard-output-intent": "off"
. . .