Tips & Tricks

How to Compress a PDF Without Losing the Clickable Links and Table of Contents

You compress a 40-page report to get it under the email attachment limit. The file size drops from 15 MB to 3 MB. The text looks fine. The images are still recognizable. But when you open the compressed PDF, the table of contents is dead. None of the chapter links work. The cross-references that used to jump to figures and tables are broken. Every internal hyperlink has been stripped. The document is smaller, but it is also broken.

Standard PDF Compression targets images. It does not intentionally remove links. But the compression process can restructure the PDF's internal object table in ways that break the link annotations. The links are still in the file, but their destination references point to page numbers or named destinations that no longer exist because the compression reorganized the file.

How to Compress a PDF Without Losing the Clickable Links and Table of Contents

Why Compression Breaks Links and Bookmarks

PDF links are stored as annotation objects. Each link contains a destination that can be a page number, a named destination such as "Chapter3," or a URL. During compression, the PDF engine may rewrite the internal object structure to optimize file size. If it rewrites the page tree, the page numbers that links point to may shift. If it removes unused named destinations to save space, the links that reference those destinations break. If it consolidates duplicate objects, annotations that shared an object reference may lose their individual destinations.

Not all compression tools cause this problem. Tools designed for PDF optimization understand the link structure and preserve it. Tools designed for generic image compression treat the PDF as a collection of images and may discard the annotation layer entirely. The difference between a tool that preserves links and one that breaks them is whether the tool understands PDF structure beyond just the images.

WukongPDF

Try Compress PDF

No installation needed. Works directly in your browser.

Get Started โ†’

How to Compress While Preserving Links and Bookmarks

WukongPDF's compression engine is PDF-aware. It analyzes the document structure, identifies image objects that can be compressed, and applies compression only to those objects. Link annotations, bookmark trees, and named destinations are preserved because they are not image data and are not modified. The compression targets the images, which are the source of the file size, and leaves the navigation structure intact.

Choose a compression level that balances size reduction with quality, then verify the links after compression. Open the compressed PDF and click a few table of contents entries, cross-references, and external URLs. If they work, the compression preserved the link structure. If they are broken, the compression tool is not PDF-aware and should be replaced with one that is.

Testing Links After Compression

A systematic test catches broken links before the document reaches its audience. Test one link of each type: a table of contents entry, pointing to a heading within the document; a cross-reference, pointing to a figure or table; a footnote reference, pointing to the footnote text and back; an external URL, pointing to a website. If all four types work, the compression was safe. If one type is broken, check whether the breakage is limited to that type or affects all links. Type-specific breakage suggests the compression tool mishandled a particular kind of annotation. Universal breakage suggests the annotation layer was discarded entirely.

Also check the bookmarks panel. Bookmarks are not technically links, they are a separate navigation tree, but they serve the same purpose. Expand the bookmarks panel and click a few entries. They should jump to the correct pages. If bookmarks are preserved but links are broken, or vice versa, the compression tool treated these two navigation systems differently.

Preventing Link Loss in Your Own Workflow

If you create PDFs that will be compressed later, such as reports that are archived and compressed for storage, export them with resilient link structures. Use named destinations instead of page-number-based destinations for internal links. Named destinations survive page renumbering because they reference a label rather than a page number. In Word, this means using Insert, Bookmark to create named anchors and Insert, Hyperlink to create links to those bookmarks. Export to PDF with the "Create bookmarks using Headings" option enabled. These practices produce a PDF that is more resilient to compression and other post-processing.

External URLs are the most resilient link type because they do not depend on the PDF's internal structure. An external URL like https://www.example.com points to a resource outside the PDF. Compression cannot break it because the destination is not inside the file. If all internal links break after compression but external URLs survive, the compression tool restructured the internal page tree and broke the internal references. This diagnostic tells you exactly what went wrong.

Recovering Lost Links When Re-Compression Is Not an Option

If the original uncompressed file is gone and the compressed file has broken links, add the links back manually. Open the PDF in a link editor. A link tool lets you draw link rectangles over the existing link text and assign destinations. Recreate each broken link. For a 40-page report with 30 broken links, this takes 20 to 30 minutes. It is tedious but necessary if the navigation structure is important and the original file cannot be recovered.

The lesson for future compression is to compress a copy, not the original, and to verify the links immediately after compression while the original is still available. The Reduce PDF Size that preserves navigation structure is the right tool. A staged compression approach also helps. WukongPDF's compression is designed for this: it produces a smaller file with all PDF Links intact.

WukongPDF

Try Compress PDF

No installation needed. Works directly in your browser.

Get Started โ†’