pdftk压缩选项 [英] pdftk compression option
问题描述
我使用 pdftk 使用以下命令行压缩pdf。
pdftk file1.pdf输出file2.pdf compress
它的作用是我的文件的权重减少。
有[选项]可以更改压缩吗?
?它很重,因为一些图形有很多点。有没有办法将这些图形转换为jpg实例和适应压缩?
我有同样的问题,不同的解决方案(有关详情,请参阅此主题)。
-
像素化(有损):
convert input.pdf -compress Zip output.pdf
-
未像素化(无损,但可能略有不同):
gs -sDEVICE = pdfwrite -dCompatibilityLevel = 1.4 -dPDFSETTINGS = / screen -dNOPAUSE -dBATCH -dQUIET -sOutputFile = output.pdf input.pdf
编辑:我刚刚发现了另一个选项(用于无损压缩),避免了令人讨厌的gs命令。 qpdf 是一个整洁的工具,可以转换PDF(压缩/解压缩,加密/解密),并且比gs命令快得多:
qpdf --linearize input.pdf output.pdf
I use pdftk to compress a pdf using the following command line
pdftk file1.pdf output file2.pdf compress
It works as the weight of my file decreased.
Are there [options] to change the compression???
Or maybe other solutions to compress my file? It is heavy because some graphics have a lot of points. Is there a way to convert these graphs to jpg for instance and adapt the compression?
解决方案I had the same problem and found two different solutions (see this thread for more details). Both reduced the size of my uncompressed PDF dramatically.
Pixelated (lossy):
convert input.pdf -compress Zip output.pdf
Unpixelated (lossless, but may display slightly differently):
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dBATCH -dQUIET -sOutputFile=output.pdf input.pdf
Edit: I just discovered another option (for lossless compression), which avoids the nasty gs command. qpdf is a neat tool that converts PDFs (compression/decompression, encryption/decryption), and is much faster than the gs command:
qpdf --linearize input.pdf output.pdf
这篇关于pdftk压缩选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!