离线 · 无上传 · 浏览器本地完成Offline · no uploads · runs in the browser
GIF 转 PDF——取首帧铺页,本地离线GIF to PDF offline — first frame, laid on a page
手里是一张 GIF——可能是截图录制的动图首帧、表情包、或者从设计稿导出的示意——要交的地方只收 PDF。这条链路是 GIF → PDF,一步到位:浏览器解出第一帧,重编码成 PNG 写进一页,页面尺寸跟着像素走(96 dpi 换算成 pt,横图自动横向)。动图会丢帧,这件事结果卡会写明(整批一处提示),而不是让你打开文件才发现只剩一帧。A GIF on hand — the first frame of a screen recording, a sticker, a diagram export — and the destination only accepts PDF. This route is GIF → PDF in one step: the browser decodes the first frame, re-encodes it as PNG and writes it onto a page sized to those pixels (96 dpi converted to pt, wide images turning landscape). Frames after the first are lost, and the result card says so for the batch rather than leaving you to discover it in the finished document.
这条链路怎么走How the route runs
GIFGIF PDFPDF
共 1 步,由扩展的路径搜索自动选出,中间产物不落盘。1 step, chosen by the extension's own path search; intermediate results never touch the disk.
会保留什么What carries over
- 首帧的像素:GIF 走画布重编码到白底,所以透明区域在 PDF 里是白的而不是黑的或花的The first frame’s pixels: GIF is re-encoded through a canvas onto white, so transparent areas come out white in the PDF rather than black or mottled
- 页面尺寸跟着图片像素走,不会把一张小图塞进 A4 的固定栏宽里再留出大片空白The page is sized from the image’s pixels instead of squeezing a small picture into a fixed A4 column of whitespace
- 一批可以合并为一份多页 PDF:GIF 在可合并的位图之列,按列表顺序逐张写页(最多 200 页)A batch can be merged into one multi-page PDF — GIF is one of the formats the merge accepts — written page by page in list order (200 pages maximum)
- 帧数是查过的:只有真的带第二帧的 GIF 才会让整批结果带上丢帧提示,单帧文件不会被误报The frame count is actually checked — the block structure is walked for a second image descriptor — so a single-frame file never triggers the batch’s lost-frames note
如实说明的限制What it does not do
- 只取第一帧:动画的时间轴不进 PDF(PDF 里的图像页没有帧可播),要留动画请继续用 GIF 或转成视频Only the first frame: a PDF image page has no timeline to play, so keep the GIF — or a video — if the animation is the content
- 产出的 PDF 是图像页,没有文字层:图里的字不能选中、搜索不到The PDF is image pages with no text layer: text inside the picture cannot be selected or searched
- 超过 8192 px 的边会被等比缩到上限再写页——不报错,但像素比原件少An edge past 8192 px is scaled down proportionally before the page is written — no error, but fewer pixels than the source
- 合并模式下任一张解码失败,整组不产出(不会给你一份缺页的文档),界面上的重试是整组一起重来;中途取消则整份文档丢弃In merged mode, one undecodable image produces no document at all (never a PDF with a page silently missing), and retrying takes the whole group again; cancelling discards the document
实操提示Working with it
- 一批最多 200 个文件,单个文件上限 100 MB;不勾选合并时,多个 .gif 逐个产出各自的 .pdfUp to 200 files per batch and 100 MB per file; without the merge ticked, several .gif files yield one .pdf each
- 只是想换图片格式,走 GIF 转 PNG 或 GIF 转 JPG 更省事(同样是首帧);转 PDF 的价值在于「一页一图」的交付形状For another picture format, GIF to PNG or GIF to JPG is the shorter path (also the first frame) — the PDF route exists for the one-page-per-image delivery shape
常见问题Questions people actually ask
动图真的只剩一张吗?Does an animated GIF really come down to one image?
是。浏览器把 GIF 解成一张位图时取的就是首帧,PDF 那一步没有可播的时间轴可用。所以只有真的带第二帧的 GIF(查的是块结构里的第二个 image descriptor)会让结果卡带上丢帧提示,让你决定是不是该换条路。Yes. Decoding a GIF to a bitmap already takes the first frame, and a PDF page has no timeline to play. So the lost-frames note appears only for a GIF that really has a second image descriptor — the block structure is walked for it — and you can decide there whether a different route fits.
为什么透明背景变成白色?Why did a transparent background turn white?
GIF 要经过画布重编码,而画布是白底填充的——PDF 里没有「透明图像页」这种可依赖的形状,留成透明在多数阅读器上会读成黑。要保留透明,请走 GIF 转 PNG。GIF goes through a canvas that is filled white first. A PDF image page has no dependable notion of transparency, and left transparent it reads as black in many viewers. To keep transparency, take GIF to PNG.
表情包要放进文档,文件会外发吗?If I put a sticker into a document, does the file leave my machine?
不会。解码、重编码、写页全在扩展的标签页里完成,只申请 storage 权限、没有 host 权限,产物里也没有从网络取来的代码。把 PDF 发出去那一步是你自己的动作。No. Decoding, re-encoding and writing the page all happen in the extension’s tab; it asks for the storage permission only, has no host permissions, and the bundle carries no remotely hosted code. Sending the PDF on is your own step.
不需要账号,也不需要联网:装好扩展后点图标,在新标签页里打开工作台,文件从磁盘直接选。No account and no network: install the extension, click its icon, and the workbench opens in a new tab reading straight off your disk.
从 Chrome 应用商店安装Install from the Chrome Web Store 安装步骤Install steps GitHub 源码Source on GitHub