ข้ามไปยังเนื้อหา

บีบอัด PDF

ทำให้ไฟล์ PDF เล็กลง และไม่ใหญ่ขึ้นเลย

ประมวลผลบนเครื่องของคุณ

เครื่องมือนี้ทำงานในเบราว์เซอร์ของคุณทั้งหมด ไฟล์ของคุณไม่ถูกอัปโหลดเลย และคุณตรวจสอบได้เองในแท็บเครือข่ายของเบราว์เซอร์ ตรวจสอบด้วยตัวเอง เปิดแท็บเครือข่ายของเบราว์เซอร์แล้วดู คุณจะเห็นคำขอเล็ก ๆ หนึ่งรายการที่ถามว่าคุณยังมีโควตางานเหลืออยู่หรือไม่ ซึ่งมีแค่ชื่อเครื่องมือกับค่าแฮช ไม่ใช่ตัวไฟล์

เครื่องมือนี้ทำอะไร

Two different things make a PDF smaller, and this tool does both in turn. The structural pass repacks the file's objects and recompresses its streams, which is lossless and usually saves 10 to 25 per cent on a document nobody has optimised before. The image pass re-encodes the pictures at a lower resolution, which is where the large reductions on a scan come from, and it is lossy. Both results are measured against the original, and if neither won you get your own file back rather than a slightly bigger one labelled compressed.

The trigger is almost always a limit somewhere else: a mail server that bounces attachments over 25 MB, an application portal that stops at 2 MB, or a 40 MB scanned contract that has to reach someone on a phone connection.

วิธีทำงาน

  1. Drop the PDF onto this page. Files up to 300 MB are accepted.
  2. Pick a level. Light is structure only and changes nothing you can see; Balanced re-encodes images at 150 dpi; Strong drops to 100 dpi for getting a scan under an attachment limit.
  3. Choose Custom to set the numbers yourself - resolution between 72 and 300 dpi, quality between 30 and 95 per cent.
  4. Open advanced options if you also want the images turned grey, the metadata stripped, or a filled form flattened first. Each makes the file smaller.
  5. Press Compress. The result reports the size before and after, and how many pages were re-encoded.

The structural pass is qpdf rewriting the file with object streams, compressed cross-references and every flate stream recompressed at level 9. Nothing about the page content changes, so it always runs whatever level you picked. On a file that has already been through a good optimiser it saves nothing at all, which is a real outcome rather than a failure.

The image pass works by re-rendering. A browser cannot reach inside a PDF and re-encode the pictures in place, so every page is drawn at the resolution you chose and written back as a JPEG. That would normally cost you the text, so the text is read out with PDF.js first and drawn back over the images in an invisible layer, keeping words selectable and searchable. What this route cannot carry across is links, form fields and annotations - if you need those, use Light.

The rule this tool will not break is that it never hands back a bigger file. An already-optimised document, and one whose images are stored more efficiently than a fresh JPEG of the same page, both genuinely come out larger. When that happens the original bytes are returned untouched and the result says the file was already optimised, because a compressor that grows your file and reports success is worse than no compressor.

Knowing where the size sits will save you a disappointment. In a scan it is the images, so Strong can take 40 MB to under 5 MB. In a text report it is the embedded fonts and the structure, so 10 to 20 per cent is a good result and re-encoding its few images changes very little.

Everything runs on your device. qpdf and PDF.js are compiled to WebAssembly and run in Web Workers, so a 300 MB scan is processed without a byte being sent anywhere.

สิ่งที่เครื่องมือนี้ทำไม่ได้

  • Anything above Light re-encodes the images, which is lossy - fine print in a scan softens, and the loss cannot be undone from the output file.
  • A document that has already been optimised may not shrink at all. In that case the original is returned unchanged and the result says so.
  • When the image pass wins, the pages are rebuilt from pictures, so links, form fields and annotations are not carried over. The text layer is, invisibly.

คำถามที่คนมักถาม

ไฟล์ของฉันจะเล็กลงเท่าไร
ขึ้นอยู่กับสิ่งที่อยู่ข้างใน เอกสารสแกนคือภาพ ระดับสมดุลจึงมักลดเหลือราวหนึ่งในสี่ของขนาดเดิม และระดับแรงเหลือไม่ถึงหนึ่งในสิบ ส่วนเอกสารข้อความคือฟอนต์และโครงสร้าง การบีบอัดแบบไม่สูญเสียคุณภาพให้ผลราว 10 ถึง 25 เปอร์เซ็นต์ และแทบไม่เหลืออะไรให้ลดอีก ผลลัพธ์จะแสดงตัวเลขทั้งสองค่า คุณจึงตัดสินใจได้ว่าจะลองระดับที่แรงขึ้นหรือไม่
เอกสารจะยังดูถูกต้องอยู่ไหม
ที่ระดับเบา หน้าตาจะเหมือนเดิมทุกประการ เพราะเปลี่ยนเฉพาะโครงสร้างไฟล์ ที่ระดับสมดุล ภาพจะถูกเข้ารหัสใหม่ที่ 150 dpi ซึ่งอ่านบนจอได้ดีเยี่ยมและพิมพ์ออกมาพอรับได้ ที่ระดับแรง 100 dpi จะเห็นความต่างเมื่อเพ่งดูงานสแกน แต่ยังอ่านได้สบาย ตรวจดูสักหน้าของผลลัพธ์ก่อนลบไฟล์ต้นฉบับ
ทำไมไฟล์ของฉันไม่เล็กลงเลย
เพราะไฟล์ถูกปรับให้เหมาะสมมาแล้ว ไฟล์ที่ส่งออกจากโปรแกรมรุ่นใหม่ หรือเคยผ่านการบีบอัดมาก่อน แทบไม่เหลืออะไรให้จัดใหม่ แทนที่จะคืนไฟล์ที่ใหญ่ขึ้นเล็กน้อยพร้อมข้อความว่าสำเร็จ เครื่องมือนี้จะคืนไฟล์ต้นฉบับให้คุณและบอกตามตรง
การบีบอัดทำให้ค้นหาข้อความไม่ได้หรือไม่
ไม่ เมื่อรอบการประมวลผลภาพทำงาน ข้อความจะถูกดึงออกมาก่อนที่หน้าจะถูกแทนที่ แล้ววาดกลับลงไปแบบมองไม่เห็นทับบนภาพ คุณจึงยังเลือก ค้นหา และคัดลอกได้ สิ่งที่หายไปในเส้นทางนี้คือลิงก์ ช่องกรอกฟอร์ม และคำอธิบายประกอบ ระดับเบาจึงมีไว้ด้วยเหตุนี้
ไฟล์ของฉันถูกอัปโหลดเพื่อบีบอัดหรือไม่
ไม่ การบีบอัดเกิดขึ้นภายในเบราว์เซอร์ของคุณ โดยรัน qpdf และ PDF.js เป็น WebAssembly ใน Web Worker เปิดเครื่องมือสำหรับนักพัฒนา สลับไปที่แท็บเครือข่าย แล้วลองบีบอัดดู จะไม่มีคำขอออกไปข้างนอกเลย และเครื่องมือนี้ทำงานแบบออฟไลน์ได้เมื่อโหลดหน้าเว็บเสร็จแล้ว
ควรใช้ระดับไหนเพื่อให้ไฟล์เล็กพอสำหรับข้อจำกัดของอีเมล
เริ่มที่ระดับสมดุลแล้วดูขนาดที่รายงาน หากยังเกินอยู่ ให้ลองระดับแรง และถ้ายังไม่พอ ให้เปิดการแปลงภาพเป็นสีเทาในตัวเลือกขั้นสูง ซึ่งมักลดงานสแกนสีลงได้อีกหนึ่งในสาม

เครื่องมือที่เกี่ยวข้อง