I'm building a PDF using LaTeX, which incorporates embedded PDF images
generated from Inkscape SVGs. The resulting latex-generated PDF document
file is rather large, so I have been running it through Ghostscript to
compress it a bit. This approach has been working nicely right up to the
point where I started using gradients in my images. At that point the
gradients appear to have been stripped by Ghostscript.
I have put together a small example and uploaded the source Inkscape SVG,
the generated Inkscape PDF and the post-Ghostscript PDF to http://
www.swaton.ukfsn.org/comp.text.pdf/
I have recorded exactly what I did to generate the in.pdf and out.pdf
files below.
Does anyone know why Ghostscript is removing the gradients like this? I
suspect it's a problem with the PDF generated by InkScape (http://
www.swaton.ukfsn.org/comp.text.pdf/in.pdf) - perhaps some problem that
viewers are lenient with but Ghostscript is strict with?
Chris
$ wget -q
http://www.swaton.ukfsn.org/comp.text.pdf/gradient.svg
$ inkscape -A in.pdf gradient.svg
$ gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=out.pdf in.pdf
$ inkscape --version
Inkscape 0.47 r22583 (Mar 12 2010)
$ gs --version
8.71
$ uname -a
Linux wotan 2.6.32-5-amd64 #1 SMP Sun May 6 04:00:17 UTC 2012 x86_64 GNU/
Linux
$ cat /etc/issue
Debian GNU/Linux 6.0 \n \l