D
D
DVoropaev2020-04-13 23:22:01
Data archiving
DVoropaev, 2020-04-13 23:22:01

How to save space on a server (linux) when storing PDF files?

The file is added by a python script and uploaded by php. When archiving, lossy compression is acceptable.
Each of the files represents several scanned a4 pages.
I tried ImageMagic, zip, rar, but for some reason the size only increased.
There is an option to store all files in one archive, but then the question is:
Does the time of extracting / adding one file depend on the number of files in the archive?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Adamos, 2020-04-13
@DVoropaev

PDF is already an archive format. Archivers, as a rule, only increase it.
If you have scanned pages inside, then the size can be famously reduced by reducing / degrading these pictures to acceptable parameters. Often people stupidly copy from a 400 dpi scanner in color - for an agreement where there is only printing on one page in color, and a document that no one will reprint, they only look at the screen. Moreover, the scanner is not particularly trying to compress something.
In general, study the keys of the ps2pdf utility - and, perhaps, you will be happy. A very powerful tool for squeezing what you really need out of a PDF.
For overclocking, you can simply try
ps2pdf -dPDFSETTINGS=/ebook YOUR.pdf Compressed.pdf

R
Roman Mirilaczvili, 2020-04-15
@2ord

To reduce the PDF size, you can reduce the resolution of the scanned image or the number of colors. Well, save in JPEG format or another, depending on the color requirements (CCITT for duotonal).
https://www.prepressure.com/pdf/basics/compression
https://gist.github.com/firstdoit/6390547
(similar to Adamos' tip )

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question