From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/80144 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Was: Opening external documents ... -> Can ConTeXt reduce size of images? Date: Tue, 08 Jan 2013 02:09:09 +0100 Message-ID: <50EB71B5.9030803@wxs.nl> References: <773069CC-F64A-434F-A6DF-7D4FF0618529@indiana.edu> <8725678D-A55B-41DC-A945-787761033B59@gmail.com> <46570E6F-7F3F-4D8A-81C2-DFFA1203431C@indiana.edu> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1357607366 2537 80.91.229.3 (8 Jan 2013 01:09:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Jan 2013 01:09:26 +0000 (UTC) Cc: Matthias Weber To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Jan 08 02:09:42 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TsNhC-0004qc-Gb for gctc-ntg-context-518@m.gmane.org; Tue, 08 Jan 2013 02:09:38 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8C33B10239; Tue, 8 Jan 2013 02:09:22 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id N9+PyeGuXIwO; Tue, 8 Jan 2013 02:09:20 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id C4AF810220; Tue, 8 Jan 2013 02:09:20 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3A3FE10220 for ; Tue, 8 Jan 2013 02:09:19 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 7n2wrZqs+hRA for ; Tue, 8 Jan 2013 02:09:15 +0100 (CET) Original-Received: from filter1-ams.mf.surf.net (filter1-ams.mf.surf.net [192.87.102.69]) by balder.ntg.nl (Postfix) with ESMTP id 0767D101EE for ; Tue, 8 Jan 2013 02:09:15 +0100 (CET) Original-Received: from smtp.ziggozakelijk.nl (D57D1DA2.static.ziggozakelijk.nl [213.125.29.162]) by filter1-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r08198cx015898 for ; Tue, 8 Jan 2013 02:09:14 +0100 X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=10.100.1.101; Original-Received: from [10.100.1.101] (unverified [10.100.1.101]) by pragma-net.nl (SurgeMail 6.1c) with ESMTP (TLS) id 2373-1713362 for multiple; Tue, 08 Jan 2013 02:09:04 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.2; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: <46570E6F-7F3F-4D8A-81C2-DFFA1203431C@indiana.edu> X-Authenticated-User: hagen@controller-9 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=213.125.29.162; country=NL; latitude=52.5000; longitude=5.7500; http://maps.google.com/maps?q=52.5000,5.7500&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0NIJd98Mi - bdfe94a18088 - 20130108 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.69 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:80144 Archived-At: 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 ___________________________________________________________________________________