สมมติคุณมี PDF Document ในมือ สมมติ Document นี้ต้อง Editing และ Redacting อาจอยาก Add Bits of Information และ Obscure Bits อื่นๆ Various PDF Programs ทำได้ แต่บ่อยครั้ง New Changes ถูกเพิ่มเป็น Layers บน Original ดังนั้นคนที่มี Expertise ถูกต้องสามารถ Glean Data จากใต้ Redaction Markers ได้
เวลาก่อน ผมเผยแพร่ Tutorial 秀如何 Flatten PDF Files 基本上หมายถึง Put All Changes into Single Layer ตอนนี้อยาก秀 Trick อีกอย่าง: Convert PDF Files into Images จะสร้าง Effect 類似 - Flattening, 加上 Ability to Use (Only) Parts of Information ใน PDF Documents Tool of the Trade: pdftocairo ใน Linux เริ่มกัน

Get the Utility, Start Converting
Pdhtocairo มัก Bundled as Part of Larger Set Tools 叫 poppler-utils มี Pretty Good Chance Distro ของคุณมี Utility Installed หรือถ้าไม่ ควรอยู่ใน Repositories Once Past This Stage Usage 簡單 - 和 Powerful ตัวอย่าง Install pdftocairo ใน Debian/Ubuntu-based:
sudo apt-get install poppler-utils
Convert to Images
Pdftocairo 有 Extensive List of Options Basic Usage:
pdftocairo -"image format" "source" "target"
例如:
pdftocairo -png www.dedoimedo.com-crash-book.pdf crash-book-images.png
Pdftocairo จะสร้าง Series of Images, One Per Page, และ Add Numeric Suffix to Chosen Target File Name ทดสอบกับ Linux Kernel Crash Book 182 หน้า ~100 Images 不 Trivial File Pdftocairo Serialized Conversion, Speed ~1-2 Pages/Second ไม่ Too Fast แต่ Operation Completed Successfully Without Errors


Fidelity of Conversion Good PNG Files High Quality 包括 Graphics ที่จุดนี้ ทำอะไรกับ Images ก็ได้ ถ้าไม่想 Convert Entire (Large) Files 可以 Individual Pages/Ranges เช่น Page 1 (-f) ถึง Page 19 (-l):
pdftocairo -svg -f 1 -l 19 www.dedoimedo.com-crash-book.pdf test.svg
Bonus: SVG Files
Best of All Pdftocairo 也 Works with SVG Format 如果有 PDF Files 有 Interesting Graphics Embedded 如 Logos/Diagrams 可能想 Recreate เป็น Individual, Scalable Files 確實 Pdftocairo 也 Convert Documents to SVG 試了 Results Pretty Good Fast and Elegant

ข้อสรุป
Pdftocairo 是 Simple Yet Powerful Tool ช่วย Manage PDF Files with Ease 允許 Redact Documents 或 Flatten Changes ไม่想แสดงเมื่อ Share Information นอกจากนี้ 還可以用 Program Restore Old Low-res Document Scans by Making SVG Files ซึ่ง Could Help Piece Together Original Information 可能ไม่ Preserved 過程 Scanning to PDF 這เป็น Separate Topic 當然 不能 "Magic" Information ที่ไม่存在 但 Definitely Can Try, 和 Pdftocairo 讓 Experiment Pretty Straightforward
หวัง Tutorial นี้ Add Another Layer of Flexibility 到 Arsenal of Privacy 和 Data Conversion Tools Pdftocairo หนึ่งใน Less-known Programs ที่ Just Sit There, Waiting to be Used Definitely Handy Utility 只觸及 Basic 但也可以 Play with Scale, Resolution, Crop, Combine Images, Change Transparency, 和甚至 Work with Password-protected PDF Files Well, That Would Be All for Today Happy Flattening. And Happy New Year!
Cheers.