Skip to content

Instantly share code, notes, and snippets.

@maxogden
maxogden / bibtex.png
Last active May 3, 2021
How to make a scientific looking PDF from markdown (with bibliography)
@markvdw
markvdw / numerical-integration.ipynb
Last active Nov 9, 2020
A notebook detailing multivariate Gauss-Hermite quadrature
View numerical-integration.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@firstdoit
firstdoit / compress-pdf-with-gs.md
Created Aug 30, 2013
Compress PDF files with ghostscript
View compress-pdf-with-gs.md

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.