From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/80159 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: Wed, 09 Jan 2013 00:30:16 +0100 Message-ID: <50ECAC08.9060400@wxs.nl> References: <773069CC-F64A-434F-A6DF-7D4FF0618529@indiana.edu> <8725678D-A55B-41DC-A945-787761033B59@gmail.com> <46570E6F-7F3F-4D8A-81C2-DFFA1203431C@indiana.edu> <50EB71B5.9030803@wxs.nl> 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 1357687819 3825 80.91.229.3 (8 Jan 2013 23:30:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Jan 2013 23:30:19 +0000 (UTC) Cc: Matthias Weber To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Jan 09 00:30:36 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 1Tsics-0000Vb-SA for gctc-ntg-context-518@m.gmane.org; Wed, 09 Jan 2013 00:30:34 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id CB2ED101EA; Wed, 9 Jan 2013 00:30:18 +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 uiyBHn-sbaFx; Wed, 9 Jan 2013 00:30:17 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 35208101E6; Wed, 9 Jan 2013 00:30:17 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 0BC36101E6 for ; Wed, 9 Jan 2013 00:30:16 +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 vc+wvj-zQ08o for ; Wed, 9 Jan 2013 00:30:14 +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 8E73C101E5 for ; Wed, 9 Jan 2013 00:30:14 +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 r08NUD86018984 for ; Wed, 9 Jan 2013 00:30: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 2556-1713362 for multiple; Wed, 09 Jan 2013 00:30:10 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.2; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: 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: 0NIJzueuV - 239bdb0c59b6 - 20130109 (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:80159 Archived-At: 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 ----------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________