From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/80158 Path: news.gmane.org!not-for-mail From: Matthias Weber Newsgroups: gmane.comp.tex.context Subject: Re: Was: Opening external documents ... -> Can ConTeXt reduce size of images? Date: Tue, 8 Jan 2013 18:04:25 -0500 Message-ID: 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 (Mac OS X Mail 6.2 \(1499\)) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1357686274 22590 80.91.229.3 (8 Jan 2013 23:04:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Jan 2013 23:04:34 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Jan 09 00:04:52 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 1TsiDz-0003IY-ER for gctc-ntg-context-518@m.gmane.org; Wed, 09 Jan 2013 00:04:51 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A03E3101F0; Wed, 9 Jan 2013 00:04:35 +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 pZjbyza9c5nS; Wed, 9 Jan 2013 00:04:32 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id B1682101E7; Wed, 9 Jan 2013 00:04:32 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 59BF6101E7 for ; Wed, 9 Jan 2013 00:04:31 +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 x46GCkD1qTqQ for ; Wed, 9 Jan 2013 00:04:29 +0100 (CET) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id 9A2DB101E5 for ; Wed, 9 Jan 2013 00:04:29 +0100 (CET) Original-Received: from hartman.uits.indiana.edu (hartman.uits.indiana.edu [129.79.1.194]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r08N4RpU001109 for ; Wed, 9 Jan 2013 00:04:28 +0100 X-IronPort-AV: E=Sophos;i="4.84,433,1355115600"; d="scan'208";a="15070327" Original-Received: from mssg-relay.indiana.edu ([129.79.1.73]) by irpt-internal-relay.indiana.edu with ESMTP; 08 Jan 2013 18:04:26 -0500 Original-Received: from hartman.uits.indiana.edu (belushi.uits.indiana.edu [129.79.1.188]) by mssg-relay.indiana.edu (8.14.5/8.14.4/IU Messaging Team) with ESMTP id r08N4M8K017607 for ; Tue, 8 Jan 2013 18:04:26 -0500 X-IronPort-AV: E=Sophos;i="4.84,433,1355115600"; d="scan'208";a="15066914" Original-Received: from candy.uits.indiana.edu (HELO mail-relay.iu.edu) ([129.79.1.201]) by irpt-internal-relay.indiana.edu with ESMTP; 08 Jan 2013 18:04:26 -0500 Original-Received: from [172.27.35.85] (c-98-223-202-18.hsd1.in.comcast.net [98.223.202.18]) (authenticated bits=0) by mail-relay.iu.edu (8.14.5/8.14.4/IU Messaging Team Submission) with ESMTP id r08N4PRP000528 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Tue, 8 Jan 2013 18:04:26 -0500 In-Reply-To: <50EB71B5.9030803@wxs.nl> X-Mailer: Apple Mail (2.1499) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=129.79.1.194; country=US; region=IN; city=Bloomington; latitude=39.1653; longitude=-86.5264; metrocode=527; areacode=812; http://maps.google.com/maps?q=39.1653,-86.5264&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0QIJz4r3p - d59f3797085b - 20130109 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 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:80158 Archived-At: Thanks Hans, I'll give this a try when I am in a daring mood and less busy. 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 ___________________________________________________________________________________