文件格式任意转换助手Transfer Any File

离线 · 无上传 · 浏览器本地完成Offline · no uploads · runs in the browser

Word 转 JPG——离线、按 A4 一页一图、不上传Word to JPG offline — one image per A4 page

三步:`docx>html` 用 mammoth 读出文档体(显式 styleMap 把 Heading 1 到 4 映射成 `h1` 到 `h4`、Title 与 Subtitle 成带 class 的 `h1` / `h2`,字符样式认 Strong 与 Emphasis,列表按 `ul` / `ol` / `li` 重开),**内嵌图片经 `mammoth.images.imgElement` 读成 data URI**(能带走的只有 png / jpeg / gif / webp / bmp / avif 那一类白名单,TIFF、EMF、WMF、SVG、HEIC 那几种会被剥掉 `src`),净化后套上自带的样式表;正文抓不到时第二条路会从 MHT altChunk 里恢复(本扩展自己写的 `.docx` 正是那种容器,所以 HTML→Word 的结果能再读回来)。`html>pdf` 把这份文档整篇渲染成一张画布、按 A4 的毫米比例算页数(页高 = 画布高 × 210 ÷ 画布宽,每 297 mm 一页向上取整,最后一片按剩余高度收),切成同高片段并**以无损位图(PNG)嵌进 PDF**;`pdf>jpg` 再逐页转成 JPEG,一页一图、两页以上打包成 ZIP(里面按 `page-N.jpg` 编号),单次最多渲染 200 页(`MAX_PDF_IMAGE_PAGES`),超过会明确让你用页码范围只选需要的页。这条路真正擅长的一件事,正好是别的取值路线做不到的:**文档里内嵌的图片会出现在产物里**——它们被读成 data URI 带进 HTML,再随排版进图;而 Word→TXT、Word→CSV 那些路只拿文字,图就没了。要说清的边界也不少:分页来自浏览器的排版,Word 自己的页面设置、页眉页脚与分节在这里没有对应物;产物是位图,没有可选中、可搜索的文字(这条链的 PDF 那一环也是页面图像,要可复制请走 Word→HTML / TXT / Markdown);脚注的引用标记会以 `[1]` 上标的形式出现在它所在的那一行里,插入修订的文字被当正文读出,只有删除修订会消失;合并单元格按 HTML 的 `colspan` / `rowspan` 画出跨格(实测跨格宽是邻格两倍、跨行高是两倍);取值那条路上被覆盖的位置不产生值、那一行的列会左移。中间那份 PDF 转图用的是默认密度(这一格不摆密度滑杆,但存储里留下的密度值会被带到这一步);整页捕获的高度上限 32768 px(一边最大 8192 px 的四倍),超过报错而不是给空白画布。扩展只有 storage 权限、全程离线:脚本不执行(净化删可执行标记,渲染用的 iframe 只给 `allow-same-origin`),文档引用的远程图片取不到字节时会剥掉引用并在结果卡按张数披露。Three steps: `docx>html` reads the body with mammoth (an explicit styleMap maps Heading 1–4 to `h1`–`h4`, Title and Subtitle to classed `h1` / `h2`, the Strong and Emphasis character styles are honoured and lists reopen as `ul` / `ol` / `li`), **embedded pictures come in through `mammoth.images.imgElement` as data URIs** (only the png / jpeg / gif / webp / bmp / avif allow-list survives; a TIFF, EMF, WMF, SVG or HEIC payload loses its `src`), the result is sanitised and wrapped in the bundled stylesheet, and when that pass finds no body a second one recovers it from the MHT altChunk (the `.docx` files this extension writes are exactly that kind of container, so an HTML→Word result can be read back). `html>pdf` renders the document into one canvas, computes the page count from the A4 metric ratio (page height = canvas height × 210 ÷ canvas width, rounding up every 297 mm, the last slice cut to what remains), slices it and **embeds each strip losslessly as PNG**; `pdf>jpg` then encodes each page as JPEG — one image per page, two or more in a ZIP with members named `page-N.jpg`, and at most 200 pages per run (`MAX_PDF_IMAGE_PAGES`), past which the route tells you to select a page range. What this route is genuinely good at is exactly what the value-extracting routes cannot do: **pictures embedded in the document appear in the output**, because they arrive as data URIs and travel into the image, while Word to TXT or CSV keeps only words and loses them. The boundaries are equally plain: pagination comes from browser layout, so Word’s own page setup, headers and footers and section breaks have no counterpart here; the artifact is a bitmap with no selectable or searchable text (the PDF in the middle is page images too, so take Word to HTML, TXT or Markdown when text must stay copyable); a footnote reference shows up as a superscript `[1]` in the line where it sits, and inserted revisions are read as ordinary text while only deletions disappear; merged cells are drawn as HTML spans here (measured: a spanning cell is twice its sibling’s width, a rowspan twice its height), while on the value-extracting routes the covered positions produce no value and that row shifts left. The intermediate PDF is rasterised at the default density (this route exposes no slider, though a density left from an earlier PDF batch travels into this step), and one capture is bounded at 32768 px of height — four times the 8192 px edge ceiling — failing rather than returning a blank canvas. The extension holds the storage permission and nothing reaches the network: scripts never run (sanitising removes executable markup and the render frame is sandboxed to `allow-same-origin`), and images the document references remotely have no bytes, so their references are stripped and the count is disclosed on the result card.

一批转换结果卡片,含文件名、体积与下载入口
一次混合批量,一个 ZIP 下载One mixed batch, one ZIP download

这条链路怎么走How the route runs

Word (.docx)Word (.docx) HTMLHTML PDFPDF JPEGJPEG

共 3 步,由扩展的路径搜索自动选出,中间产物不落盘。3 steps, chosen by the extension's own path search; intermediate results never touch the disk.

会保留什么What carries over

  • 内嵌图片里的 png / jpeg / gif / webp / bmp / avif 会留在产物里(读成 data URI 带进 HTML 再随排版进图)——取值类路线做不到这一件Embedded png, jpeg, gif, webp, bmp and avif pictures survive into the output (data URIs travelling through the layout into the image) — something the value-extracting routes cannot do
  • 标题、列表与强调按 styleMap 变成真正的结构再渲染,产物看到的是排好版的面Headings, lists and emphasis become real structure through the styleMap before rendering, so the picture shows a laid-out page
  • 切片无损:中间那份 PDF 的页面是 PNG,压缩只发生在最后交给 JPEG 的那一次Lossless slices: the intermediate PDF holds PNG pages, so compression happens once, on the final JPEG
  • 一页一图、两页以上 ZIP、成员名 `page-N.jpg`:分页由排版算出来而不是硬切One image per page, a ZIP from two pages up with members named `page-N.jpg`: the breaks come from layout rather than a hard cut

如实说明的限制What it does not do

  • 一次最多渲染 200 页(`MAX_PDF_IMAGE_PAGES`):超过会报错并让你用页码范围只选需要的页,或先把文档拆开At most 200 pages per run (`MAX_PDF_IMAGE_PAGES`): past that the route fails and points at a page range or splitting the document
  • 产物是位图:没有文字层,文字不能选中、搜索或复制,Word 的页面设置、页眉页脚与分节也不参与分页(要可复制的文字请走 HTML / TXT / Markdown)The artifact is a bitmap: no selectable, searchable or copyable text, and Word’s page setup, headers, footers and section breaks take no part in the breaks (take HTML, TXT or Markdown for copyable words)
  • 脚注引用会以 `[1]` 出现在所在那一行的值里,插入修订的文字按正文读出;删除修订与批注不会出现A footnote reference appears as `[1]` inside the value of the line carrying it and inserted revisions read as ordinary text; deletions and comments do not appear
  • 整页捕获高度上限 32768 px;这一格不摆密度滑杆,但上一批 PDF 留下的密度值仍会被带到这一步A 32768 px ceiling on one capture, and while this route exposes no density slider, a density left from an earlier PDF batch is still forwarded into this step
  • 文档以网络地址或相邻路径引用的外链图片取不到字节:引用在渲染前被剥掉,结果卡按张数披露,位置是虚线方框或直接留空Pictures referenced by network address or sibling path have no bytes: the references are stripped before rendering, the count is disclosed on the card, and a spot is a dashed box or left blank

实操提示Working with it

  • 要一份单文件的多页文档:Word→PDF 走同一条渲染链(那里的文字同样是图像)For one multi-page file: Word to PDF, the same rendering chain (its text is imagery too)
  • 要结构与文字都留住:Word→HTML 或 Word→Markdown,图片仍以内联数据形式跟过去To keep structure and words: Word to HTML or Markdown, where pictures still travel as inline data
  • 只要格子里的值:Word→CSV / Word→Excel,那里交付的是数据而不是版面For the values in the cells: Word to CSV or Excel, which deliver data rather than a page

常见问题Questions people actually ask

文档里的图片会跟着过去吗?Do the pictures in my document come along?

内嵌在文档里的会——前提是类型在那几种位图之内(`png / jpeg / gif / webp / bmp / avif / ico`):它们被读成 data URI 带进中间那份 HTML,再随排版进图;白名单外的(TIFF、EMF、WMF 这类)在渲染前就丢了 `src`,图上那一处换成虚线方框并按张数计入丢弃。以网络地址引用的那一种同样不会——这条路完全离线,那些引用在渲染前就被剥掉,结果卡按张数写明丢了几张。Embedded ones do, provided the type is one of the rasters that carry their own bytes (`png / jpeg / gif / webp / bmp / avif / ico`): they are read as data URIs into the intermediate HTML and travel with the layout into the image. A TIFF, EMF or WMF loses its `src` before rendering, so its spot becomes a dashed box and counts among the dropped pictures. Pictures referenced over a network do not come along either — the route is fully offline, those references are stripped before rendering and the result card says how many were lost.

分页会照我在 Word 里设的吗?Will it break pages the way Word does?

不会。中间那步是浏览器排版:文档被整篇渲染成一张画布,再按 A4 的高度比例切页。页边距、分节与页眉页脚这些 Word 概念没有对应物,所以页数与断点只由排版算出来。要沿用 Word 自己的分页,唯一的入口是 Word 导出的那份 PDF,再走 PDF→JPG。No. The middle step is browser layout: the document is rendered into one canvas and sliced by the A4 height ratio. Margins, section breaks and headers have no counterpart, so page count and breaks come from that layout alone. Word’s own pagination is reachable only through a PDF that Word exported, followed by PDF to JPG.

为什么图里的字不能复制?Why can’t the text in the image be copied?

因为产物是每页一张位图,没有文字层——这条链里的 PDF 那一环同样是页面图像,不是可取字的文本层。需要复制、搜索或朗读,请走 Word→HTML、Word→Markdown 或 Word→TXT;要保留观感又要有字,就只能由 Word 自己导出的 PDF 来做,那不在本扩展的路线里。Because the artifact is one bitmap per page with no text layer — and the PDF in this chain is page images as well, not a text layer. For copying, searching or reading aloud take Word to HTML, Markdown or TXT; a text-bearing PDF has to come from Word itself, which is outside this extension’s routes.

不需要账号,也不需要联网:装好扩展后点图标,在新标签页里打开工作台,文件从磁盘直接选。No account and no network: install the extension, click its icon, and the workbench opens in a new tab reading straight off your disk.