How it works:
- Use find to get a list of all PDF files in the given directory.
- For each file:
- Is the file larger than the minimum required file size (5MB)?; skip, if no, continue if yes.
- Create a low quality variant of the file in /tmp, named „originfilename_low.pdf“
- Check if low quality variant has a lower file size; if yes move it to the origin folder. If the new file is larger then the origin, remove it.
The script can be found on GitHub, see here.
Kommentare
Kommentare sind für diesen Blogbeitrag (noch) nicht aktiviert. Nach der Veröffentlichung eines Blogbeitrags dauert das in der Regel noch ein paar Minuten.
Alternative: Anmerkung per E-Mail
Du kannst mir Anmerkungen zum Blogbeitrag per E-Mail schicken, wenn du hier klickst. Der Inhalt davon bleibt privat und wird nicht hier im Kommentarbereich veröffentlicht.