I have used Ghostscript to compress the pdf output of some large files as it seems to do a better job of getting rid of duplicate font information than Adobe Acrobat (which sometimes loses certain math glyphs). I use XeLaTeX and my documents contain lots of pdf graphics, each of which were also produced by XeLaTeX, all of which contain the Calibri font found on Windows.
The command I use is gswin64 -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dNOPAUSE -dQUIET -dBATCH -sOutputFile=foo-compressed.pdf foo.pdf, which I found in an answer here.
My documents now include some interactive 3D graphics using the \includemedia command of the media9 package. Each of these 3D graphics is created with Asymptote and are in the .prc format.
When I use the above Ghostscript command to compress the file, all the .prc information is lost - the 3D graphics are no longer interactive. I tried changing the compatibility level of the pdf to 1.7, but that didn't help.
Is there a way to use Ghostscript without losing the .prc information?
asymptote's interactive content in the first place. – Janosh Mar 29 '16 at 20:58\myincludegraphicscommand that responded to a BooleanusethreeDgraphics. When this Boolean wasTrue, then the image created also had the.prcinformation encoded (and the file size was larger). When this Boolean wasFalse, my command\myincludegraphicsjust inserted a picture, and not the.prcinformation. – GregH Mar 30 '16 at 18:28ghostscriptthen maybe qpdf with--compression-level=9 --recompress-flatewould be acceptable. You might need other options – Doc Octal Jul 17 '21 at 22:25