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

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

CSV 转 JPG——离线、A4 分页逐页编码、不上传CSV to JPG offline — A4 pages, no upload

三步:`csv>html` 用 `raw: true` 读取并写成一张 HTML 表(`00424` 不缩成 `424`、`2024-01-05` 不会变成 `1/5/24`,实测 `data-v` 与显示文本一致),套上自带的样式表;`html>pdf` 把这份文档按 A4 分页,**每一页以无损位图嵌进 PDF**(渲染逐页走 `toDataURL` 的 PNG 那一条),`pdf>jpg` 再把每一页编码成 JPEG。这条形状是路由里写死的取舍,不是顺带:同为图片目标,PNG 走整页捕获得到一张长图,而 JPG 与 WebP 走 PDF 那条,因为同分的图片目标里这条排序由 `edgePreference` 决定(`html>pdf` 是 0、`html>png` 是 10,小的排前面),所以图片出口的分页形状是路由定的,不是顺带的。于是三件具体的事跟着来:**一页一图**,长表跨页、两张以上以 ZIP 交付;**只损失一次**,中间那份 PDF 的页面是无损的,压缩只在最后交给 JPEG 那一次发生;**这里才有档位可调**——质量与目标体积挂在有损容器上(编码器与面板都按这一条来),所以想让文字边缘更干净就升质量,想让文件更小就设目标体积,后者会先降质量、再降尺寸去追。要照实说的两条:最后那道编码是有损的,质量与目标体积就是为它准备的档位;而图里的文字不是文字,不能选中、搜索或朗读。高度那条边界与 CSV→PNG 共享同一个量法:32768 px 限制的是「整篇文档一次渲染成的那块画布」,A4 分页是在它之上切出来的,超限就报错。全程在这个标签页里完成,只有 storage 权限,渲染前会剥掉远程引用。Three steps: `csv>html` reads with `raw: true` and writes one styled HTML table (so `00424` does not shrink to `424` and `2024-01-05` does not become `1/5/24`; measured, `data-v` and the displayed text agree); `html>pdf` lays that document out as A4 pages, **embedding each page as a lossless bitmap** (the per-page render goes down the PNG branch of `toDataURL`), and `pdf>jpg` then encodes every page as JPEG. That shape is a routing decision, not a side effect: between the two image ends, PNG takes the whole-page capture and yields one tall image, while JPG and WebP take the PDF route, because the tie between the two image ends is decided by `edgePreference` (0 on `html>pdf`, 10 on `html>png`, lower sorting first), so the paging shape of this output is a routing fact rather than a side effect. Three concrete things come with it: **one image per page**, so a long table spans pages and two or more arrive in a ZIP; **only one lossy step**, since the PDF in the middle holds lossless pages and compression happens once, on the way out; and **this is where the dials live** — quality and a target file size belong to lossy containers, for both the encoder and the panel, so a higher quality keeps text edges cleaner while a target size chases quality down first and resolution after. Two things stated plainly: the final encode on this route is lossy, and quality and a target size are precisely its dials; and text in the picture is not text, with nothing to select, search or read aloud. The height boundary is shared with CSV to PNG in the same measurement: 32768 px caps the one canvas the whole document is rendered into, and the A4 slicing happens on top of it, so an over-tall document fails. All of it inside this tab on the storage permission, with remote references stripped before rendering.

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

这条链路怎么走How the route runs

CSVCSV HTMLHTML PDFPDF JPEGJPEG

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

会保留什么What carries over

  • 一页一张 JPEG:长表按 A4 切开,每张都是完整的一页,适合直接翻页查看或打印One JPEG per A4 page: a long table is cut into whole pages you can flip through or print
  • 只损失一次:中间那份 PDF 的页面是无损位图,压缩只在最后交给 JPEG 的那一次发生Only one lossy step: the PDF in the middle holds lossless bitmaps, so compression happens once, on the way out
  • 值按文件里的字符进表格,`raw: true` 让 `00424` 与 `2024-01-05` 保持原样Values enter the table as the characters in the file, and `raw: true` keeps `00424` and `2024-01-05` as typed
  • 质量与目标体积在这里可调(它们本就挂在有损容器上),编码后再按目标追逐Quality and a target file size are adjustable here (they belong to lossy containers), with a chase after encoding

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

  • 最后一道是有损编码:质量与目标体积两个档位都是为它准备的,要严格还原同一套线条与字形请走 CSV→PNGThe final encode is lossy, with quality and target size as its two dials — take CSV to PNG for an exact rendering of the same rules and glyphs
  • 多页出 ZIP,不是一张大图:想「一眼看完」请走 CSV→PNG(整页捕获)或 CSV→PDF(一份文档)Several pages arrive as a ZIP rather than one picture: for one view take CSV to PNG (whole-page capture) or CSV to PDF (one document)
  • 一次最多渲染 200 页(`MAX_PDF_IMAGE_PAGES`):超过就报「要渲染的页数过多」,并让你用页码范围只选需要的页或先把文件拆开——每一页在编码前各自占着一张全尺寸画布,200 页已经是数百 MB,再往前是标签页自己崩掉,那比一条错误难说清得多At most 200 pages rasterise in one pass (`MAX_PDF_IMAGE_PAGES`): past that the route reports “too many pages to render at once” and points at a page range or splitting the file — every page holds a full-size canvas until it is encoded, 200 of them is already hundreds of megabytes, and beyond that the tab crashes itself, which is far harder to explain than an error
  • 文字不可选中、搜索或朗读:产物是位图,要这些请用 HTML / Markdown / ExcelNothing is selectable, searchable or copyable: the artifact is bitmap; use HTML, Markdown or Excel for that
  • 条纹按行序落、第一行没有表头待遇:`sheet_to_html` 不产出 `<th>`(实测),样式表的浅底挂在 `<th>` 与偶数行上Striping follows row order and row one gets no header treatment: `sheet_to_html` emits no `<th>` (measured), while the stylesheet hangs its tint on `<th>` and even rows
  • 32768 px 量的是整篇文档一次渲染成的那块画布(A4 分页在其上切),超限报错而不是交付被截短的内容;排版宽度固定在 800 px 正文,画布像素密度按高度取档A 32768 px ceiling on the single canvas the whole document is rendered into (the A4 slicing happens on top of it), failing rather than trimming; the measure stays 800 px while the pixel density steps with height

实操提示Working with it

  • 要严格无损的一张图:CSV→PNG,整页捕获、无第二次压缩For one exactly-lossless picture: CSV to PNG, a whole-page capture with no second compression
  • 要能打印的成品:CSV→PDF,页面本身就是文档,比一叠图片更好归档For something printable: CSV to PDF, where the pages are a document rather than a stack of images
  • 要继续算:CSV→Excel / CSV→JSON,交付数据而不是交付画面To keep computing: CSV to Excel or JSON, which deliver data instead of a picture

常见问题Questions people actually ask

我的表很长,会得到几张图?My table is long — how many images do I get?

按 A4 分页决定张数,两张以上时产物是一个 ZIP,里面一页一图。若你更想要一张连续的长图,那正是 CSV→PNG 的形状(同一份表格,整页一次捕获)。The A4 slicing sets the count, and two or more pages arrive as a ZIP with one picture per page. If you would rather have one continuous image, that is exactly what CSV to PNG does with the same table.

质量与目标体积这两个档位,在这一格里分别做什么?What do quality and target size actually do on this route?

两个都挂在有损容器上:编码器只在 JPEG / WebP 时用它们,面板也按同一条规则不给 PNG 摆这两档。设了目标体积时先沿质量档往下走,走不到再把画面缩小重试——所以「字看着更软」有两种来路:主动调低,或被目标体积逼下去。要严格还原请走 CSV→PNG,那里这两档都不存在,也不会做第二次量化。Both belong to lossy containers: the encoder reaches for them only on JPEG and WebP, and the panel follows the same rule by not offering either for PNG. A target size is chased first down the quality ladder and then by scaling the picture, so softer-looking type has two possible causes — asked for, or pushed into it by the target. For an exact rendering take CSV to PNG, where neither dial exists and no second quantisation happens.

为什么不直接把长图压成一张 JPEG?Why not just compress the tall image into one JPEG?

这条链在同分的图片目标上显式让 PDF 那一路优先(`html>png` 带较低的 `edgePreference`),因为同分的图片目标里排序由 `edgePreference` 决定(`html>pdf` 是 0、`html>png` 是 10,小的排前面);它改变的是分页与页边界,不是压缩次数。想要一张长图,PNG 那一格就给。The routing breaks the tie between image ends in favour of the PDF path (the PNG edge carries a lower `edgePreference`), because the ordering between the tied image ends comes from `edgePreference` (0 on `html>pdf`, 10 on `html>png`, lower first); what that choice changes is paging and page bounds, not the number of compressions. If you want the single tall picture, the PNG page is it.

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