Sanitizing PDF files with ghostscript


 * source: https://github.com/sumatrapdfreader/sumatrapdf/issues/983

use Ghostscript (v9.22) to sanitize the pdf file:


 * C:\path\to\ghostscript -dNOPAUSE -sDEVICE=ps2write -sOUTPUTFILE=temp.ps file.pdf
 * C:\path\to\ghostscript -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=sanitized_file.pdf temp.ps
 * del temp.ps