PdfCraft 0.21.0 于 2026 年 11 月 11 日发布,距 0.20.0 两天,共 132 条更新。这一版带来了三项很多人要的功能:打开 Office 文件、在已有文字里查找替换,以及会记住设置的打印对话框。和上一版一样,它也补上了几处密文处理后内容仍留在文件里的漏洞。第二天又发布了 0.21.1 ,修复 Flatpak 版的更新。
先说中文用户关心的
Word、Excel、PowerPoint 文件可以直接打开了,前提是你装了 LibreOffice。 转换完全由 LibreOffice 完成,版式和字体效果取决于你的 LibreOffice 和系统里的中文字体,我们还没有测试中文文档的转换效果。
段落里混排不同文字时,原字体保留得更多。 以前在段落里加入原字体没有的字符,整段都会换成替代字体;现在只有缺的那几个字符换。不过,编辑 PDF 里已有的中文文字仍然不可靠,重要文件请先留副本。
新功能的按钮大多已有中文(「替换为」「全部替换」「自定义…」「打印区域…」),我们照中文界面写。
打开 Word、Excel 和 PowerPoint 文件
「文件 › 打开」可以选 Office 文档了 ,前提是电脑上装了 LibreOffice。打开对话框里多了「Office 文档」一类。Word、Excel、PowerPoint、OpenDocument 和 RTF 文件会打开成一个新的、未保存的 PDF(报告.docx 变成 报告.pdf)。PdfCraft 自己不读这些文件,而是在后台调用你的 LibreOffice 转换,所以版式是 LibreOffice 排出来的。它在系统 PATH、常见的安装文件夹和环境变量 PDFCRAFT_SOFFICE 指定的位置找 LibreOffice;找不到时会提示需要安装 LibreOffice。
目前只有「文件 › 打开」能这样用。 「插入页面」「合并文件」和「创建 PDF」里的多文件创建还不接受 Office 文档,会提示你改用「文件 › 打开」。网页版不能转换。
转换时可能联网的情况。 PdfCraft 自己不建立任何网络连接。它给 LibreOffice 一个全新的配置:关闭宏、阻止不受信任的链接,并让 Writer 和 Calc 永不更新链接的内容。开发者在 gaps.md 的第 8 项里说明了两处不足:Impress(演示文稿)没有这个设置,LibreOffice 进程本身也没有被隔离在网络之外,所以链接了网上内容的演示文稿可能会去下载它。在开发者自己的测试里,链接到本机监听程序的测试文档没有发起连接。
编辑已有文字
查找替换。 「编辑 › 替换…」(Ctrl+Shift+H,Mac 上是 ⇧⌘H)会打开「编辑文本」,并在查找框里加一行「替换为」。「替换」改当前高亮的匹配,「全部替换」改全文所有匹配,算一步撤销。替换后的词沿用所在段落的字体、字号和颜色,段落在原来的框里重新换行。表单字段、注释里的匹配和跨段落的匹配不改,只计数。
编辑段落时,删掉的文字原来占的间距会保留。
打印
打印对话框会记住设置 :双面、灰度、逐份打印、缩放方式、注释和表单、「作为图像打印」,重启后仍然有效。每台打印机各自记住 纸张、缩放和双面设置,并默认选中你上次用的打印机。
自定义纸张尺寸。 「纸张」旁边的「自定义…」可以加一个自己的尺寸,每边 1 到 200 英寸,随设置保存。打印机自己支持的纸张也会出现在列表里,还新增了 Folio 和 Folio / F4 两种。PdfCraft 会读取打印机默认的纸张尺寸。
Windows 上打印更清晰。 以前页面先按约 96 dpi 画好再送去打印,现在按打印机的分辨率画(打印任务没说明时用 300 dpi)。大图能完整打印,内嵌的 TrueType 字体不再打出错字,透明内容在较老的(GDI)驱动上也能打印。还修复了佳能和东芝驱动的问题,以及「Failed to merge print tickets」错误。
没有灰度选项的驱动也能灰度打印;CUPS 上横向页面保持横向;不支持双面的打印机不会收到双面请求;Mac 上没指定纸盒的任务会选择自动。
**「印刷制作」**新增「添加打印标记…」(裁切标记、出血标记、套准标记、色条和页面信息行,之后还能去掉)和「转换颜色…」(转为灰度、RGB 或 CMYK),加上 0.20.0 的「修复细线…」,共三项。
**打印选中区域:**用「拍摄快照」框选页面的一部分,再用「打印区域…」只打印这一块。小册子 打印可以补偿爬移(厚小册子里内页向外推出的那一点距离)。
隐私和密文处理
又补上了四种内容留在密文下面的情况。
在标记下面、既做裁剪又做填充的图形,填充被去掉了,轮廓却留在文件里。
扫描件共用的字形字典(JBIG2)可能保存着标记下面的字形,当用到它的图片通过别的途径被删除时,字典却留了下来。
类型写成引用的密文标记会被跳过,其他标记照常应用;直接写在页面注释列表里(而不是以引用方式写入)的注释,即使在标记下面也会保留。
紧挨着内容解析器读不懂的字节的文字,既找不到也删不掉,但别的阅读器仍然会显示它。现在「应用密文」遇到这种页面会拒绝处理(提示该页有无法读取的内容,不能安全地处理),「删除隐藏信息」也一样。
如果你用以前的版本做过密文处理,请从原文件重新做一遍。
密码在内存里停留的时间更短。 加密密钥、私钥,以及你在「保护」和「签名」对话框里输入的密码,不再需要时会从内存中清除;关闭或取消对话框后,也不再留着输入过的密码。
如果文件的权限允许除提取页面以外的所有更改,现在不能再提取页面。关闭 JavaScript 后,给智能体用的引导操作和批量任务也不再运行表单脚本。
表单和签名
**空的签名框会显示一个「签名」标签,**告诉需要签名的人在哪里签。点它就开始签名。
**自定义图章可以带一行文字,**在放下图章时自动填入:「创建自定义图章」里的「添加一行,在放置图章时填入」,默认是「By {name} at {time}, {date}」。
字段属性的「计算」页可以查看和编辑自定义计算脚本。表单按钮可以打开文档里的附件:PDF 在新标签页打开,其他文件只提供保存,不会被运行。
表单脚本支持更多 Acrobat 的功能:文档打开、保存、打印时的动作,焦点和鼠标事件,按钮标题,页面框。列表框会显示表单选中的那一项。动态 XFA 表单修了很多问题。
查看和文件
PDF 组合文件 (portfolio)会打开它的第一个文档并列出其中的文件。附件的描述可以编辑。
图层按文档的自动设置打开,「图层」面板按文档里的顺序排列。
相对链接按文档的基础地址解析。帮助系统常用 manual.pdf#page=12 这样带页码或目标的方式打开文件,现在会直接打开到那里。
窗口没有焦点时也能用 Ctrl+滚轮缩放。「首选项」里的连续滚动开关恢复正常。在对话框或菜单里按键不会再影响页面。
Windows 上,覆盖保存到网络共享(Samba 或 NAS)的文件不会再变成隐藏文件;Tesseract 和 --control 工具启动时不再弹出命令行窗口。
「识别文本」不再截掉一行开头和结尾的字母。
「PDF 优化器」把单色图片和蒙版存成黑白图像,文件更小。
怎么更新
如果你装的是 0.15.0 或更新的版本,PdfCraft 启动时会提示更新到最新版本(被 ArtCraft Launcher 固定在其他版本、或者你关掉了启动检查的除外)。有未保存的修改时选择重启更新,现在会弹出保存提示;取消的话,更新保持就绪。否则请到下载页 下载。新版本会替换旧版本,设置保持不变。各系统的细节见下载指南 。
这份说明是我们根据下面的改动列表和对应的合并请求写的,其中的改动我们没有逐项实测。
全部 132 项改动 列表来自 GitHub 发布页,是开发者写的英文原文。
Fix main's Windows build: xtask's temp folder builder is mutable only on Unix #6712 Land renderer patches, layer auto state, auto-tag artifacts, export clips and print page lookup (#3969, #4393, #4396, #4410, #4433, #4459, #4159, #5075, #5973) #6711 fix(a11y): mark vector graphics and images as artifacts in autotag_text (#4080) #4159 M2: an Indexed image with a short lookup table or an out-of-range hival is drawn as most readers draw it, and one with no table is skipped with a warning (view.render-pages) #4393 M2: layers open in the state the view auto state sets, and the Layers panel follows /Order (view.layers-panel) #4396 fix(render): degenerate subpaths, all-zero dash arrays and negative line widths stroke as the spec says (hayro-interpret patch 61) #4410 M2: zero-area fills and clips mark the pixels they touch (view.render-pages) #4433 M2: the standard 14 fonts fit the Euro to its standard width (view.render-pages) #4459 fix(edit): Office export respects a form's /BBox and a page's re/W/n clip #5075 fix(print,engine): read the page tree once when finding which pages' text reads up #5973 Land forms, links, find and redaction-save fixes (#4496, #4532, #3567, #3773, #4470, #4474, #4497, #5658) #6710 M9: empty signature fields show a Sign tab, sized to the field #3773 M3: relative links resolve against the document's base URI, and a link is active only in its QuadPoints (view.follow-links) #4474 M6: list boxes show and pick the option /I names, and a single-select list shows one value (#4531) #4532 M5: the text selection bar stays inside the pages' area (#5577) #5658 Land comment groups, appearance defaults, callout parts, pop-ups and stamp lines (#4358, #4365, #4094, #2137, #2345) #6713 M6: custom stamps can carry a line filled in when they are placed (#1741) #2345 Windows gate: the owner-rights test allows an elevated run #6729 Land XFA layout, scripting and form fixes (#3589, #4336, #4359, #4517, #4537, #4608, #4662, #4664, #4784, #4791, #5010, #5122, #5124, #5153, #5225, #5368, #5369, #5370, #5393) #6716 M12: screen-only and print-only XFA objects are shown and printed as the form says #4336 M12: XFA enter and exit scripts run whenever a field gains or loses focus #4359 M12: run an XFA signature field's preSign scripts before it is signed and postSign after #4517 XFA: fields and exclusion groups that must be filled in are Required #4537 fix(xfa): AcroForm field walks read each field once and bound what they queue #5122 Land print production, viewer, attachment and optimizer changes (#1918, #1998, #2539, #2348, #2701, #3806, #4139, #4378, #4401, #4763, #5259, #5508, #5316, #4434, #4440, #6092, #6098) #6714 Allow Ctrl+wheel zoom in an unfocused window (#3736) #3806 M10: landscape sheets stay landscape on CUPS, with a test at each print path (rebases #3068; @zdblazer) #4763 M12: a PDF portfolio opens on its initial document and shows its files (#1652) #5259 M12: edit attachment descriptions #5508 fix(a11y): annotation checks and form tagging stop copying shared annotation data #6092 fix(forms): AFSimple_Calculate folds field values as it reads them, within an allowance #6098 Search: keep the match in the middle while a zoom is still on (#3530, builds on #3547) #4139 M3: a password prompt keeps a place in the open queue for its retry #6731 Align stream decode cap with renderer at 256 MiB #6585 M10: the Print dialog remembers two-sided, grayscale, collate, sizing, comments & forms and Print as image (#2001, #6392) #2103 feat(print): add Folio and Folio / F4 paper presets (#4777) #4953 fix(print): fall back to the lpoptions listing when the PPD is unreadable (#4699) #4703 M10: grayscale with Print as image prints on a driver that keeps no grayscale (#5806) #5882 M10: each printer keeps its paper, sizing and two-sided choice across restarts; the last printer is preselected (#2001) #6779 FormCalc: a script its own clock stops is abandoned, as when the wait runs out first (flaky hostile_formcalc test) #6783 fix(print): M10 — Windows ya no cambia las letras de las fuentes TrueType incrustadas (#3132) #4098 fix: cap print dialog height to the screen so it can't overflow top/b… #6223 Print: list printers without asking drivers; ask only about the one picked (#2192) #3554 M10 #5130: resolve Windows printer-default duplex before spooling #5180 M10: Windows prints at the printer's resolution, not ~96 dpi; Canon and Toshiba ticket fixes (craft-print 0e4943cb) (#4941) #6793 fix(preflight): handle typeless annotations, indexed colour, and indirect filters #5279 Updates: Restart to Update with unsaved changes opens the save prompt #6726 Zeroize key material, KDF buffers, and UI password drafts (#3928) #4427 fix(ui): keep added image corner resize responsive and clip out-of-bounds drag preview (#4477, #3938) #4625 Booklet printing: creep compensation #6790 M6: the Calculate tab shows and edits a field's custom calculation script (#6630) #6717 fix(annot,ui-egui): guard comment edits against non-comments and stale state (#3916) #4673 M10: preserve printable Link appearances (#5022) #5028 M6: form buttons open the files attached to their document (exportDataObject) #3575 fix(ui): All tools ▸ Edit a PDF turns on Edit text & images at once #4605 fix(export): skip empty HTML runs and clamp heading levels to h6 #6136 Updates test: answer the startup prompt before clicking in Preferences #6799 M12: XFA forms with many repeated rows lay out in linear time (form.xfa-dynamic) #6776 M2: a JBIG2 mask with a large symbol dictionary draws, and one a decoder limit refuses takes its picture with it (#6722) #6784 M7: a font's metrics can be read within a caller's decode allowance (#6239, merged with main) #6800 M7: a font's metrics can be read within a caller's decode allowance #6239 M7: paragraph edits keep the advance of the text they drop (edit.text-edit) #2968 M12: dynamic XFA forms tab in their template's traversal order #4149 fix(ui): keys under a dialog or a menu leave the pages alone (keyboard routing, part 1) #6608 fix(edit): preserve source fonts in mixed-script paragraphs (#2778, merged with main) #6806 M8: redaction keeps an image a form without resources still draws (#6341, merged with main) #6805 M8: redaction keeps an image a form without resources still draws #6341 Windows: Tesseract and the --control tools start without a console window (#6732) #6735 M3: a file named with open parameters opens at their destination (#3425) #5049 fix(redact): a shared JBIG2 dictionary leaves with whatever used it, by any route #5698 Find and replace text in Edit text mode: a Replace row in the Find box, Replace all as one undo step #2467 M10: Windows prints a large image whole: drawn as tiles under Windows.Data.Pdf's cap (#5131) #5897 Print: custom paper sizes, kept per printer with its setup (re-lands #2381) #6830 fix(annot): drop Apple Markup's stale copy when a page's annotations change #2829 M10: Recognize text no longer clips the first and last letters of a line #5058 Bump storytold/egui to 725a39fc (lands #6699) #6824 Print a selected area from Take a Snapshot (lands #2491) #6820 M10: preserve annotation placement precision in vector prints #5002 fix(forms): ignore print requests from automatic field scripts #4166 M10: retain printed artwork with indirect annotation metadata (lands #4668) #6855 fix(print): keep the localized reset label off the properties panel title #5550 fix(ui-egui): keep hotbar picker stationary while resizing #6513 M10: a booklet's both sides follow a driver that keeps its own two-sided setting (#5772) #5903 M10: preserve NoRotate appearance geometry in vector printing #5036 Print in grayscale prints on a Windows driver with no grey option (#5806) #6863 Do not send duplex to printers without two-sided support #6673 Render: an isolated CMYK group of any size blends in CMYK, in bands #6885 fix(print): auto-detect printer paper size and add page setup sync (fixes #5861) #6100 M10: preserve annotation layers in vector print output #5019 Print: a printer's remembered paper wins over its driver's default paper #6906 fix: Continuous Scrolling toggle not working in Preference tab (#6780) #6889 macOS: a job that names no paper tray asks for Auto Select (craft-print 1ee01a4c, #3752) #6905 M4: bind property drafts with edit-session and replay UI scenarios #4594 Test: the non-UTF-8 output-name probe test doesn't run on macOS #6913 fix(platform): preserve visibility when saving files to network paths (#5001) #5048 feat(js): expose document page boxes #5501 Test: at the minimum width on macOS the main menu may be the folded Menu button #6920 CI: the workspace's tests on macOS each night (and on demand) #6921 Fix #5211: make calculateNow synchronous #5304 Test: wait for the paper row before clicking Custom… while discovery is pending #6925 Add JavaScript push-button caption methods #5505 Fix #5211: persist JavaScript field colours #5499 fix(optimize): bound each unused-resource decode by the remaining shared budget #6046 cos: drop the duplicate decoded_strict_within that breaks main #6933 fix(cos): remove duplicate decoded_strict_within that broke main #6934 packaging: use [[ for bash tests (SonarCloud S7688) #6932 M7: replacing a line keeps both of two dropped quote copies' line move and spacing (edit.text-edit) #2961 fix(cos): cap the total entries a materialized xref-stream chain merges (#5082) #5090 fix(engine, automation): Action Wizard and doc_batch honour JavaScript being off (#5080) #5088 Print: the printer's own paper sizes in the Paper list, named as the job's media #2672 fix(render): bound the objects lopdf's fallback parses from object streams and arrays (#5083) #5095 fix: anchor comments to highlighted text #3763 fix(js): follow every reading of a script in the nesting guard, so a regex can't put it out of phase (#5079) #5087 Print: flatten transparent sheets for GDI (v3) printer drivers (#6155, #5838, #5940) #6955 fix: integrate persistent AcroForm script workflows with native prompts and appearance writeback #5699 feat(prc): PrcFile::units, the model's unit from its model file #6919 perf(organize): decode the XMP packet once for repeated document-information reads #6918 fix(cos): a clone that edits an object stream or a /Length stops reading what other clones cached #6910 fix(crypt, engine): refuse page extraction when Protect allows any change except extracting pages (#5081) #5089 M10: open Word, Excel and PowerPoint files through LibreOffice #3059 feat(forms): open, Will Save and Will Print actions, widget pointer/focus scripts, setItems/setAction/toSource (port of #344) #6969 M7: a font's metrics are past their allowance only when it refused a read #6813 M11: Optimize stores a picture's one-bit masks as monochrome images #6825 M8: the Type 3 cleanup charges the page only when there is a Type 3 font #6860 M8: the redaction walk reads a form's /Matrix entries by reference #6886 M8: redaction reads an operator's operands from the end, as the renderer does #6927 M11: Optimize stores one-bit images and masks past 80 million pixels as monochrome images #6935 M8: redaction refuses a page whose content it can't fully parse #6882 fix(redact): apply marks with an indirect /Subtype and judge inline annotations #5849 fix(forms): deleting a field removes ancestors it leaves without kids #6997 fix(redact): a covered clip-and-paint path leaves an empty clip, not its outline #6996 Release: PdfCraft v0.21.0 #6995 在 GitHub 查看全部改动 → ← 上一版: 0.20.0 下一版: 0.21.1 →