TOC links not working in exported PDF

Paul Walk's Avatar

Paul Walk

30 May, 2022 09:01 AM

// Please enter a detailed description of the issue // Description of the issue:

// Please enter a list of steps required to reproduce the issue // Steps to reproduce:

  1. Create a markdown document
  2. Add a Table of contents using the <!--TOC--> syntax
  3. View document in Marked (The TOC works and clicking on a link in the TOC navigates/scrolls to the correct header in the document)
  4. Export as PDF (paginated or continuous)
  5. Open PDF in Preview
  6. TOC links are displayted, but they do not actually link (clicking them has no effect)

// If applicable please attach a sample document that causes the issue for you.

Original document, and example out put PDF attached

// Configuration (do not edit) Marked 2 1031 (Direct)

macOS Version: 12.4

allowPageBreakInCode: YES
bookTxtIsLeanpub: NO
summaryMdIsGitBook: NO
codeIsPoetry: NO
codeCanWrap: YES
collapsibleHeadlines: YES
convertGithubCheckboxes: YES
convertGithubEmoji: YES
convertYAMLToMMD: NO
defaultMathJaxConfig: TeX-AMS-MML_HTMLorMML
defaultPreviewStyle: 3
defaultProcessor: MultiMarkdown
enableMiniMap: NO
excludeBlockQuotesFromCounts: NO
excludeFootnotesFromCounts: YES
excludeVerbatimFromCounts: NO
excludeCaptionsFromCounts: NO
folderPreviewExtensionsArray: md, markdown, txt, mdown, html, opml
githubNewlines: YES
h1IsPageBreak: YES
h2IsPageBreak: NO
hrIsPageBreak: NO
includeMathJax: YES
includeKatex: NO
limitTextWidth: NO
mathNumberEquations: NO
mathNumberEquationsSide: 0
mathNumberEquationsAMSOnly: NO
minimalJavaScript: NO
permissionGranted: NO
printHeaderBottomRight: %page of %total
printHeaderFirstPage: NO
printFooterFirstPage: YES
printHeaderTopRight: %title
processHTMLFiles: YES
removeMetadataForPreview: NO
removeYAMLHeaders: NO
scrollToEdit: YES
shouldDetectCritic: YES
shouldHighlightMarkupErrors: NO
shouldLoadCritic: NO
syntaxHighlight: YES
syntaxHighlightOnlyLang: NO
useCustomMarkdownProcessor: NO
useCustomPreprocessor: NO
useFirstH1AsPrintTitle: YES

  1. Support Staff 1 Posted by Brett on 30 May, 2022 01:40 PM

    Brett's Avatar

    If you search the support site, you’ll find that this is a long-standing issue. It’s due to a bug in the version of WebKit that Marked relies on, and that version is deprecated by Apple and the bug is unlikely to be fixed.

    Marked may eventually be refactored to use a version of WebKit that fixes this issue, but at present that would result in the loss of a significant amount of other functionality.

    One option is to export html from Marked, including scripts and styles, and then open in a current version of Safari or Firefox and print to PDF. You lose Marked‘s headers and footers, but the TOC links will work.


  2. 2 Posted by Paul Walk on 30 May, 2022 01:43 PM

    Paul Walk's Avatar

    Thanks Brett - I did see this explanation flagged up as a response to my issue - and I did accept it as a good response, but then the helpdesk system went ahead and posted my question anyway...!

    Anyway - understood - thanks!


  3. Support Staff 3 Posted by Brett on 30 May, 2022 02:20 PM

    Brett's Avatar

    Well at least *part* of the support system is working properly :P. Thanks for understanding :)

    - Brett

  4. 4 Posted by Paul Walk on 30 May, 2022 02:22 PM

    Paul Walk's Avatar


Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Already uploaded files

  • 5.32 KB
  • toc_test_paginated.pdf 36.3 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac