Tunapunk is a user on niu.moe. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.
Tunapunk @wasamasa@niu.moe

@jakob I've come up with an ingenious way to save your server's drives from overflowing:

gs -sDEVICE=pdfwrite -dBATCH -dNOPAUSE -dQUIET -sOutputFile=out.pdf in.pdf

With this you can remove all attachments except text and images. I've confirmed that the remaining size is mostly images by running `pdfimages -all in.pdf /tmp/out`. I think I'll make me an `unbloatpdf` alias or something.

@wasamasa That's awesome! This is actually really useful for when I load issues onto my phone to read on the go, too

@wasamasa Really impressive results, too; issue 0x09 shrank down by 71.4%

@jakob One more thing. Ghostscript fails on a few unprocessed PDFs as it expects valid input. I found pdftk to make for a good preprocessor (it fixes errors, but doesn't go all the way):

pdftk input.pdf output output.pdf