Skip to content

导出pdf文件没有书签(或者说文档目录结构)Exporting PDF files without bookmarks (or document directory structure) #3357

Closed

Description

@CarefreeLu

不知道是没有实现这个功能,还是我不知道如何使用这个功能。如果真没有这个功能还真的有必要。

I don't know if it's not implemented or if I don't know how to use it. It would be necessary if it didn't exist.

Activity

  1. YalandHong commented on Jul 20, 2022

    @YalandHong

    Duplicate of #3238, #2695 and #80 (comment)

  2. suye0620 commented on Jul 21, 2022

    @suye0620

    这个功能已经实现了,但是使用起来有点麻烦。可能还没有来得及完善。
    图片
    你需要在文档开头添加[TOC]然后在导出的弹窗中设置“Table of Content”的Title::名字,就是目录名,然后导出时就可以获得带有目录的PDF文档。

    The feature you want has been implemented, but there are some steps before exporting. You need to add [TOC] ahead of the markdown file or the place you want. And then you need to give a name for your TOC in the window(“Table of Content”→Title::) when exporting PDF.

    Typora costs money ( $ _ $ ), I hate it

  3. CarefreeLu commented on Jul 22, 2022

    @CarefreeLu
    Author

    @suye0620 非常感谢你的回复,导出的确可以在文档首页生成目录。也能跳转到每个小节。比之前要方便一些了。但不是我最想要的左侧的书签导航。

  4. wjuncn commented on Jul 25, 2022

    @wjuncn

    目前导出确实没找到这个功能,我一般用 pdfpatcher 来加上左侧的书签目录。 https://github.com/wmjordan/PDFPatcher

  5. 2016317200329 commented on Sep 4, 2022

    @2016317200329

    Thanks a lot. Really need that when I have to share files in PDF with others

  6. coolxbin commented on Sep 15, 2022

    @coolxbin

    Thanks a lot. Really need that when I have to share files in PDF with others

    是的,这个功能对大文件来说非常方便,期待能实现!
    当前TOC功能,我在v0.17.1上面尝试了两次没有成功,个人认为TOC功能还是更适合HTML导出

    Yes, this feature is very convenient for large files, look forward to it!
    The current TOC feature, which I tried twice in V0.17.1 without success。I think it's more suitable for HTML export

  7. 2016317200329 commented on Sep 15, 2022

    @2016317200329

    Thanks a lot. Really need that when I have to share files in PDF with others

    是的,这个功能对大文件来说非常方便,期待能实现! 当前TOC功能,我在v0.17.1上面尝试了两次没有成功,个人认为TOC功能还是更适合HTML导出

    Yes, this feature is very convenient for large files, look forward to it! The current TOC feature, which I tried twice in V0.17.1 without success。I think it's more suitable for HTML export

    Same v0.17.1. And got a success following #3357 (comment).
    Maybe you should let "include top headings" in the export windows stay on and try it again.

    同样是v0.17.1. 按照https://github.com/marktext/marktext/issues/3357#issuecomment-1191182854提供的方法取得了成功。或许你应该让export窗口的"include top headings"保持打开然后再试一次

  8. lightshares commented on Oct 8, 2022

    @lightshares

    @suye0620 非常感谢你的回复,导出的确可以在文档首页生成目录。也能跳转到每个小节。比之前要方便一些了。但不是我最想要的左侧的书签导航。 这个什么时候支持

  9. cmjzzx commented on Aug 22, 2023

    @cmjzzx

    这个功能已经实现了,但是使用起来有点麻烦。可能还没有来得及完善。 图片 你需要在文档开头添加[TOC]然后在导出的弹窗中设置“Table of Content”的Title::名字,就是目录名,然后导出时就可以获得带有目录的PDF文档。

    The feature you want has been implemented, but there are some steps before exporting. You need to add [TOC] ahead of the markdown file or the place you want. And then you need to give a name for your TOC in the window(“Table of Content”→Title::) when exporting PDF.

    Typora costs money ( $ _ $ ), I hate it

    非常感谢🙏

  10. SplitGemini commented on Jan 18, 2024

    @SplitGemini

    Any updates? TOC is now implemented, but bookmarks for pdf are not.

    有更新吗,导出PDF的书签目录还是没有实现

  11. SplitGemini commented on Jan 18, 2024

    @SplitGemini

    image

    Pay attention to the bookmark on the left, need this effect.

  12. added
    🦄 feature request
    🕊️ export/pdf
    on May 16, 2026
  13. Jocs commented on Sep 22, 2026

    @Jocs
    Member

    This is implemented now.

    导出 PDF 时会自动生成左侧书签导航(不是文档内的 [TOC] 页)。The PDF export now passes generateTaggedPDF + generateDocumentOutline to printToPDF, which builds a real /Outlines tree from the document's h1–h6 headings — that is the left-hand bookmark pane you asked for.

    Shipped in v0.20.0-beta.5 (51b039b3); not in stable 0.19.1, so you will see it in 0.20.0.

    Closing as completed. (Same feature as #2695.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🕊️ export/pdf🦄 feature request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions