When pdfout is missing it defaults to <input>_gso.pdf

gscompress(pdfin, pdfout, firstpage, lastpage, pdflevel = "1.5",
  gsopts = "", Force = TRUE)

Arguments

pdfin, pdfout

Input and Output PDFs

firstpage, lastpage

Page range (defaults to firstpage = 1, lastpage = last in PDF)

pdflevel

Minimum compatible PDF version of output file

gsopts

Further options for ghostscript

Force

When FALSE, only update file for newer input

Value

character vector with path to pdfout

Details

This seems to work well for pdflatex output

Examples

if (FALSE) { gscompress('statistics.pdf',gsopts='-dSubsetFonts=true -dEmbedAllFonts=true') }