编辑书签
为一份长文档补上它本该拥有的大纲。
这款工具完全在你的浏览器中运行。文件从不上传,你可以在浏览器的网络标签中亲自验证这一点。 亲自验证:打开浏览器的网络标签观察。你会看到一个查询你是否还有剩余任务的小请求,只包含工具名称和一段哈希,绝不会包含文件。
这款工具的作用
Bookmarks are the panel down the side of a reader that lists a document's sections and jumps to them. A long PDF without one is a scroll bar and nothing else. This tool writes that outline: you build the tree by hand, or generate it from the headings the document already has, and each entry is written as a jump to a page in the file itself.
Use it on the documents that need an outline most and rarely have one: a scanned report, a bundle merged from a dozen sources, a manual exported by a tool that did not bother, a court filing where someone has to find exhibit 14 quickly. Renaming an existing entry that reads "Heading 2.1.4" is the other common reason people arrive.
工作原理
- Drop the PDF onto this page. Any outline it already has is read and shown as a tree.
- Add entries, retitle them, and drag them to change their level - a bookmark nested under another becomes a sub-entry in the reader's panel.
- Set the page each entry points at.
- Or turn on generation from headings and let the document's own heading structure become the tree, then tidy what it produced.
- Press Save bookmarks and the download starts.
Generating from headings uses the same size-and-position analysis that PDF to Markdown uses. There is no heading tag in a normal PDF - a heading is simply text that is bigger, bolder or more isolated than the text around it - so the structure is inferred from the page rather than read from it. A document that converts to Markdown with sensible headings gets sensible bookmarks from the same reading, and one that does not will need tidying afterwards.
Each entry is written as an explicit destination with the view position left unset, which tells a reader to jump to the page and keep the zoom the reader is already at. Naming a page beyond the end of the document is clamped to the last page rather than written as given: readers handle an out-of-range destination inconsistently and a few refuse to open the file at all.
Nesting is the part that makes an outline useful rather than merely long. A branch with children is written open, so a reader shows the chapters expanded on first opening rather than a row of collapsed triangles. Titles are stored as Unicode, so a heading with an accent, a dash or a non-Latin script comes through as written.
The tree replaces the document's outline rather than merging into it, so what you see in the editor before you save is exactly what the file will have. There is no way to save an empty outline here - the tool needs at least one entry - so this is not the way to strip bookmarks out of a document.
The reading, the analysis and the writing all happen in your browser. Generating an outline for a 400-page scan takes a while because every page's text has to be examined, and the progress bar counts pages rather than guessing; none of those pages leaves the device.
这款工具做不到的事
- Generated bookmarks are inferred from type size and position, not read from tags. A document with decorative large text gets entries that are not chapters, one with a flat visual hierarchy gets a flat tree, and a scan with no text layer produces nothing at all - run OCR first, then come back.
常见问题
- PDF 书签到底是什么?
- 它们是文档自身的目录,以一棵条目树的形式保存,每个条目指向一页。阅读器把它显示在侧栏里——Acrobat 叫书签,预览叫目录,Chrome 显示为文档大纲。它们不同于印在页面上的目录页(那只是文字),也不同于你浏览器保存的书签。
- 它能替我构建大纲吗?
- 能,从文档的标题构建。它会检查每一页的文字,把看起来像标题的部分——字号更大、更粗、周围留白更多——变成条目,并按其表观层级嵌套。这在文字处理软件生成的报告和手册上效果好,在视觉层次扁平的文档上效果差些。把结果当作初稿,再加以整理。
- 我怎么做子书签?
- 在树里把一个条目嵌到另一个下面,它就成了子条目。深度没有值得担心的限制——阅读器能从容处理好几层,而实用价值大约在三层达到顶点。有子级的分支会以展开状态写出,所以文档首次打开时阅读器会显示为已展开。
- 我合并后的 PDF 丢了书签。这是解决办法吗?
- 这是办法之一,更好的是用合并 PDF 来合并,它会重建每个来源的大纲,并把每个条目重新指向其新的页面位置。如果损坏已经造成,或来源本就没有大纲,就在这里构建一个——从标题生成通常比手动敲入一堆合集的章节要快。
- 为了分析,文档会被上传吗?
- 不会。标题分析在你的机器上、在一个 Web Worker 里运行,这正是长文档要花可见时间而非瞬间完成的原因——工作是在这里进行,而不是在核数更多的服务器上。关于文档的任何内容,包括你敲入的章节标题,都不会被传出。