On 1/9/2013 12:04 AM, Matthias Weber wrote:
Thanks Hans,
I'll give this a try when I am in a daring mood and less busy.
the latest beta has this: % \enabletrackers[graphics.programs] \starttext \externalfigure[cow.pdf][conversion=stripped] \stoptext Of course I cannot guarantee that the pdf gets stripped, but at least it's tried.
Matthias
On Jan 7, 2013, at 8:09 PM, Hans Hagen
wrote: On 1/8/2013 1:00 AM, Matthias Weber wrote:
So, this clearly is not a ConTeXt problem. But it causes me major headaches. In my workflow, I have dozens of images that I prepare with Adobe Illustrator and save as pdf files that are still editable with Illustrator, i.e. that include another copy of the file with layers etc. In other words, my pdf images are about 10 times as big as they need to be. I usually just reduce the file size with preview. As this seems to be erroneous now, I am wondering:
it's even worse ... all kind of color and other data is present is such a file .. the pstopdf.rb script (comes with mkii) gets rid of some of that
normally at pragma we do such things either automatically (when graphics are put in repositories) or with acrobat in batch mode (doable if you get the graphics in advance) because doing such thing smanually for thousands of images is no fun
you can play with this:
\startluacode local gsp = os.type == "windows" and "gswin32c" or "gs" local gsc = "%s -q -dEPSCrop -sDEVICE=pdfwrite -dNOPAUSE -dSAFER -dNOCACHE -dBATCH -dProcessColorModel=/DeviceCMYK -sOutputFile=%s %s -c quit" local pdp = "pdftops -eps %s %s"
figures.converters.pdf = { xxx = function(oldname,newname) local tmpname = oldname .. ".ps" local command = string.format(pdp,oldname,tmpname) os.execute(command) local command = string.format(gsc,gsp,newname,oldname) os.execute(command) end }
figures.registersuffix("xxx","pdf") \stopluacode
\starttext
\externalfigure[cow.pdf][conversion=xxx]
\stoptext
pdftops comes with xpdf (also in minimals)
if needed I can add a standard converter for it
Hans
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
-- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------