PDF Compression - Compress PDF Attachments, Reduce PDF Size, Attachment Compression
by Modvanta https://modvantaapps.tech/odoo-apps/pdf-compression/$ 28.92

PDF Compression for Odoo 19
Compress PDF attachments when they are uploaded and shrink the PDFs already in your filestore: images inside the PDF are downsampled and saved again as JPEG, text stays sharp, and every saving is logged.
Written and supported by Modvanta - modvantaapps@gmail.com
What it does
Scanned delivery slips, photo reports and supplier certificates are often several megabytes each, and they fill the filestore, the backups and the mailboxes they are sent to. This app compresses PDF attachments automatically. A rule says which documents it applies to, from which size, and how much quality to keep. New PDFs are compressed as soon as they are attached, including files dropped in the chatter, and a button or the daily scheduled action compresses the PDFs that already exist. Ghostscript is used when it is installed on the server; otherwise a built-in Python engine re-encodes the images. Digitally signed and encrypted PDFs are never changed, and a file is only replaced if it really gets smaller.
Who it is for: Companies that attach scans and photo reports to sales orders, deliveries, invoices, contacts or projects, and administrators who want a smaller filestore and smaller backups.
Why merchants pick it
Automatic on upload Chatter uploads and any PDF attached to a matching document are compressed right away. | Existing files too Compress the PDFs already stored, in batches, with a button or every night. | Quality you choose High, balanced or smallest file, or your own resolution, JPEG quality and maximum image width. |
Safe by design Signed and encrypted PDFs are skipped, and a file is replaced only when it gets at least the minimum saving. | Undo possible Keep the original for a number of days and restore it from the log in one click. | Measured savings Every file is logged with its size before and after; a pivot and graph show the total saved per model and month. |
Key features
Compress PDF attachments on upload (chatter, documents, any model) Batch compression of existing PDFs: button and daily scheduled action Rules per document model, minimum size, newer / older than N days Quality levels: high (220 dpi), balanced (150 dpi), smallest (96 dpi), custom Ghostscript engine, automatic fallback to a Python (Pillow) engine Images downsampled and re-encoded as JPEG; text and vectors kept Signed and encrypted PDFs never modified Minimum saving percentage before a file is replaced | Keep the original, restore it, delete originals after N days Replace identical files sharing the same stored file Files per run limit for large filestores Compress PDF action on selected attachments Result popup with sizes before and after Compression log and savings report (pivot, graph) Compression state and original size on each attachment Multi-company rules |
Upload in the chatter, compressed at once
A scanned delivery slip attached in the chatter of a contact went from 860 KB to 84 KB while it was uploaded.

Compression rule
Documents, minimum size, age, on upload and in batch, quality level, engine, minimum saving and originals. The engine line shows whether Ghostscript is installed.

Compress the existing PDFs
One click compresses the waiting PDFs and shows each file with its size before and after.

Compression log
Every file with its rule, trigger, engine, original and new size, saving and state. Kept originals can be restored from here.

Savings report
Total size before and after, and bytes saved, per document model and month.

Compress selected attachments
Choose attachments, pick a quality level and compress them on demand.

Compression state on attachments
The attachment list shows which PDFs are compressed and their new size.

Keep originals for a while
A rule can keep each original for 30 days before deleting it, so any file can be restored.

How it works
1 | Install A default rule compresses PDF attachments of 200 KB and more, at balanced quality, on upload and every night. |
2 | Adjust the rules Settings -> PDF Compression -> PDF Compression Rules: documents, size, quality, originals. |
3 | Compress what is already there Open a rule and click Compress Existing PDFs Now, or let the daily action do it. |
4 | Check the savings Settings -> PDF Compression -> Savings Report. |
Settings
| Documents | Models whose PDF attachments are compressed; empty means all. |
| Minimum Size / dates | Smallest file size, only files newer or older than N days. |
| Compress on Upload / in Batch | When the rule runs. |
| Quality | High, balanced, smallest or custom (dpi, JPEG quality, max image width). |
| Engine | Automatic, Ghostscript or Python. |
| Minimum Saving | Replace the file only if it gets at least this much smaller. |
| Originals | Keep the original, delete it after N days, replace identical files. |
FAQ
Compatibility and support
Odoo 19 Community and Enterprise. Ghostscript optional (recommended); the Python engine uses Pillow, already required by Odoo.
Questions, installation help or a feature request: write to modvantaapps@gmail.com.
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
Discuss (mail)
|
| Lines of code | 949 |
| Technical Name |
mdv_pdf_compression |
| License | OPL-1 |
| Website | https://modvantaapps.tech/odoo-apps/pdf-compression/ |
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module