Skip to content

Instantly share code, notes, and snippets.

View A6GibKm's full-sized avatar
🥑

Maximiliano A6GibKm

🥑
View GitHub Profile
@gl-sergei
gl-sergei / inbox.el
Last active December 21, 2022 21:38
Display number of unread messages in Emacs modeline (with mu and mu4e)
;;; inbox.el --- display inbox status information -*- coding: utf-8 -*-
;; Copyright (C) 2014 Sergei Glushchenko.
;; Author: Sergei Glushchenko <gl.sergei@gmail.com>
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
@guifromrio
guifromrio / compress-pdf-with-gs.md
Created August 30, 2013 14:39
Compress PDF files with ghostscript

This can reduce files to ~15% of their size (2.3M to 345K, in one case) with no obvious degradation of quality.

ghostscript -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf

Other options for PDFSETTINGS:

  • /screen selects low-resolution output similar to the Acrobat Distiller "Screen Optimized" setting.
  • /ebook selects medium-resolution output similar to the Acrobat Distiller "eBook" setting.
  • /printer selects output similar to the Acrobat Distiller "Print Optimized" setting.
  • /prepress selects output similar to Acrobat Distiller "Prepress Optimized" setting.