Sử dụng pdfimages
pdfimages là một công cụ trích xuất hình ảnh PDF giúp lưu hình ảnh trong tệp PDF thành định dạng tệp PPM, PBM, JPEG hoặc JPEG 2000.
Đây là một phần của poppler-utilsgói, bạn sẽ cần cài đặt.
Sử dụng: pdfimages [options] <PDF-file> <image-root>
Ví dụ: Phần sau đây trích xuất tất cả hình ảnh từ tệp PDF, lưu chúng ở định dạng JPEG.
pdfimages -j in.pdf /tmp/out
Sẽ lưu hình ảnh từ tệp PDF in.pdftrong các tệp /tmp/out-000.jpg(hoặc /tmp/out-000.pbm; xem bên dưới) /tmp/out-001.jpg, v.v.
Trang man pdfimages giải thích:
-j: Normally, all images are written as PBM (for monochrome images) or PPM for
non-monochrome images) files. With this option, images in DCT format are
saved as JPEG files. All non-DCT images are saved in PBM/PPM format as usual.
pdfimageslàm điều đó tốt hơn / tồi tệ hơn NitroPDF?