跳到正文

图片转 PDF

把照片和扫描件放进一个 PDF,不重新编码。

在你的设备上处理

这款工具完全在你的浏览器中运行。文件从不上传,你可以在浏览器的网络标签中亲自验证这一点。 亲自验证:打开浏览器的网络标签观察。你会看到一个查询你是否还有剩余任务的小请求,只包含工具名称和一段哈希,绝不会包含文件。

这款工具的作用

This places your images into a PDF, one to a page or several to a sheet. A JPEG or a PNG is embedded byte for byte, because a PDF can carry both encodings natively and decoding a photo only to re-compress it on the way in would cost quality for nothing. WebP, HEIC, AVIF, TIFF, GIF and BMP have to be converted, since a PDF cannot hold them, and that conversion happens exactly once.

Reach for it when a set of pictures has to travel as one document: photographs of a signed contract taken on a phone, an expense claim where every receipt arrived as its own JPG, screenshots for a bug report, or a scanner app's output that an upload form will only accept as a single attachment.

工作原理

  1. Drop your images onto this page, or use the file picker. Up to 200 at once, and the list you see is the page order.
  2. Drag a row to move an image, or use the arrow buttons if you are working from a keyboard.
  3. Choose the page size. Match the image gives every page the shape of the picture on it; A4 or Letter puts them all on standard paper.
  4. Set the fit. Contain shows the whole image, cover fills the page and crops whatever hangs over, stretch distorts it to fill exactly.
  5. Turn off one image per page if you want a contact sheet, then say how many images go on each sheet.
  6. Press Convert. The download starts on its own.

JPEG and PNG go in untouched. Both are encodings a PDF carries natively, so the bytes of your photograph are copied into the document rather than decoded and re-compressed, and a 4 MB JPEG contributes about 4 MB. Most converters decode everything and re-encode it as a JPEG at some quality setting, which is why pictures that went in sharp come out soft. The quality slider here reaches only the formats a PDF cannot hold, and it applies to each of them once.

Phone photographs are the reason auto-rotate exists. A camera almost always stores its picture landscape and writes an EXIF orientation tag saying which way up it belongs, and browsers apply that tag inconsistently when they decode. The tag is read and applied here rather than left to the decoder, which is why a page of photographed documents comes out upright instead of lying on its side.

An image that carries no resolution in its metadata is placed at 96 dpi, the CSS reference resolution. That is what makes a screenshot arrive at roughly the size it appeared on screen rather than blown up to fill a sheet of A3. A scan that records its own dpi is placed at that instead, so a 300 dpi page of A4 lands as a page of A4.

Contain is the default fit for the same reason it is the default everywhere on this site. Cover fills the page and crops whatever will not fit, and quietly trimming the top of somebody's signature is not a trade a tool should make on its own. Stretch fills the page exactly and distorts the picture to do it, which is occasionally right for a background and almost never right for a document.

Nothing is uploaded. Decoding, rotation and page composition all happen in Web Workers inside your browser, so a folder of 200 photographs never leaves the device. That is worth more here than for most file types, because a photograph carries a timestamp and often a location alongside the picture itself.

这款工具做不到的事

  • HEIC and AVIF are decoded by your browser, and most browsers outside Safari cannot decode HEIC at all, so those files will fail to convert on Chrome and Firefox. Convert them to JPEG first.
  • The result is a picture of text, not text. Nothing in the PDF is selectable or searchable; run OCR PDF afterwards if you need to find words in it.

常见问题

转换会降低照片质量吗?
JPEG 和 PNG 不会。两者都是 PDF 能直接承载的格式,所以文件自身的字节会被原样嵌入,完全不解码、不重新压缩。PDF 无法承载的格式——HEIC、WebP、AVIF、TIFF、GIF 和 BMP——会转换一次,默认质量为 90%,你可以在高级选项中把它提高到 100。
怎样决定哪张图片成为哪一页?
拖放区下方的列表就是页面顺序,从上到下阅读。拖动某一行来移动它,或者用每行的箭头按钮,如果你不想拖动的话。再添加图片会把它们排到末尾,所以第二次拖入的一批会跟在第一次拖入的一批后面。
我可以使用哪些图片格式?
JPEG、PNG、WebP、GIF、BMP、TIFF、HEIC 和 AVIF。前两者原样嵌入。其余的由你的浏览器解码,并在导入时重新编码一次,这意味着你的浏览器无法解码的任何格式都无法转换——实际上就是 Safari 以外的 HEIC。
为什么在其他工具里我的手机照片是横倒的?
因为相机把照片横向保存,并在 EXIF 标签里记录了本应有的方向,而各解码器对这个标签的处理并不一致。自动转正会读取该标签,并在放置之前把图片本身转过来,所以页面是正立的。它默认开启;如果某张图片本来就是正的、你想让它保持原样,就把它关掉。
我的照片会被上传到什么地方吗?
不会。每一步都在你的浏览器中运行,图片从不被传输。你可以核实而不必只是相信:打开浏览器的网络标签,转换一张图片,看着没有任何请求发出。页面加载一次之后,这款工具在你完全断网的情况下也能使用。
PDF 比我预想的大得多。我能怎么办?
照片 PDF 的大小大致等于这些照片的大小,因为图像数据是整个保留、而非缩小的。20 张 4 MB 的图片会生成一个 80 MB 的文档。之后运行「压缩 PDF」,以更低的质量重新编码这些图像——那才是用细节换大小的工具,把它作为单独的一步,意味着这个取舍由你来做。

相关工具