Save *cropped* figures to pdf, eps, png, jpeg, and tiff through Ghostscript.
Author: Peder Axensten
I'm using this script to export figures to pdf. The figures have an image background, with vector elements (dots) overlaid. Sometimes the vector elements are kept as vectors, sometimes they are merged with the image... and I can't work out why, or how to force vector elements to be retained. It may have to do with the complexity of the figure. Any suggestions would be appreciated. Otherwise, great script!