PDF Compression

I have a requirement to dynamically generate and compress large batches of PDF files.

I review conventional algorithms

  • Zip
  • Ace
  • Rahr

Any other suggestion is welcome.

My question is which algorithm can give me the smallest file size. Speed ​​and efficiency are also important factors, but size is my main concern.

It also matters if I have many small files or fewer large files in each archive.

Most of my processing will be done in PHP, but I am happy to interact with third-party executables, if necessary.

Edit:

Documents are mainly invoices and should not contain any other images than the company logo

+3
6

PDF . , ( PDF " " ). , , , PDF .

PDF , (, ) . , PDF , ZIP PDF .

PDF , . , . , , .

, , . , , , , .

+5

, 7z , RAR , , .

+1

LZMA , .

, , PDF .

+1

, / , PDF . , , , , tar it?

+1

( ) PDF , - . 96% ( ..) . 1-2Mb 8 9Mb, 4 .

Zip OK, , PDF , , . , 2.31Mb - , - 1.92Mb ZIP 1.90Mb RAR.

LZMA .

? WinRAR, WinAce 7Zip .

+1

Precomp 7-Zip. zLib PDF, 7-Zip ( ) . 50% . PDF, (zLib/LZW) ZIP/GZip/JAR/GIF/PNG...

. (PDF- > PCF), / (PCF- > PDF).

For better results than with Precomp + 7-Zip, you can try the lprepaq and prepaq options, but be careful, especially preaq is slooww :) - the bright side is that prepaq offers the best (PDF) compression available in present.

+1
source

Source: https://habr.com/ru/post/1723660/


All Articles