From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/63823 Path: news.gmane.org!not-for-mail From: Siep Kroonenberg Newsgroups: gmane.comp.tex.context Subject: Re: Convert eps to pdf Date: Mon, 22 Nov 2010 16:38:16 +0100 Message-ID: <20101122153816.GA6630@molly> References: <201011221151.49732.alan.braslau@cea.fr> Reply-To: Siep Kroonenberg , mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1290440382 11100 80.91.229.12 (22 Nov 2010 15:39:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 22 Nov 2010 15:39:42 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Mon Nov 22 16:39:38 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PKYUT-0008Aq-Pb for gctc-ntg-context-518@m.gmane.org; Mon, 22 Nov 2010 16:39:37 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 2C1E0CA86D; Mon, 22 Nov 2010 16:39:37 +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 IGupsIHz5qSp; Mon, 22 Nov 2010 16:39:31 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8A748CA863; Mon, 22 Nov 2010 16:39:31 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 0EFD6CA863 for ; Mon, 22 Nov 2010 16:39:30 +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 RKiESgjK7ZFb for ; Mon, 22 Nov 2010 16:39:18 +0100 (CET) Original-Received: from filter2-til.mf.surf.net (filter2-til.mf.surf.net [194.171.167.218]) by balder.ntg.nl (Postfix) with ESMTP id 90298CA852 for ; Mon, 22 Nov 2010 16:39:18 +0100 (CET) Original-Received: from smtp20.nijmegen.internl.net (smtp20.nijmegen.internl.net [217.149.192.18]) by filter2-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id oAMFdHJQ021343 for ; Mon, 22 Nov 2010 16:39:18 +0100 Original-Received: from molly (43-134.surfsnel.dsl.internl.net [145.99.134.43]) by smtp20.nijmegen.internl.net (8.13.8/2.04) with ESMTP id oAMFcGl6014574; Mon, 22 Nov 2010 16:38:16 +0100 (CET) Mail-Followup-To: ntg-context@ntg.nl Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-Language-Detected: en X-Spam-Scanned: InterNLnet Mail Scan System V2.03 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=217.149.192.18; country=NL; region=03; city=Nijmegen; latitude=51.8333; longitude=5.8667; http://maps.google.com/maps?q=51.8333,5.8667&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0bDyfDhvD - f13458027d5a - 20101122 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.218 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:63823 Archived-At: On Mon, Nov 22, 2010 at 12:02:13PM +0100, Mojca Miklavec wrote: > On Mon, Nov 22, 2010 at 11:51, Alan BRASLAU wrote: > > ConTeXt mkiv will take an encapsulated postscript (eps) file through > > \externalfigure [myfigure.eps] > > and creates a (compressed) pdf version as m_k_i_v_myfigure.pdf > > that conserves the vectorial components of the eps file. > > > > Other standard conversion tools, notably those based on ghostscript, > > generally create a bitmap image with pretty horrible results. > > > > The vectorial conversion must be fully trivial, but I am ignorant > > of the tools available for this manipulation (other than ConTeXt!), > > as well as the inverse (pdf->eps) conversion. Perhaps I am simply > > missing some simple (ghostscript, pstoedit, ...) option. > > 1.) ps2pdf -dEPSCrop file.eps file.pdf > > On some systems you have "epstopdf". > > 2.) gs -dSAFER -dBATCH -dNOPAUSE -dEPSCrop \ > -sDEVICE=pdfwrite -sOutputFile=file.pdf file.ps > > I use the same command for conversion into bitmap figures: > gs -dSAFER -dBATCH -dNOPAUSE -dEPSCrop \ > -dGraphicsAlphaBits=4 -dTextAlphaBits=4 -r500 \ > -sDEVICE=pngalpha -sOutputFile=file.png file.ps > > Usually the conversion from PDF to EPS is slightly problematic for (to > me) unknow reason. For pdf to eps, use pdftops from the xpdf suite (http://www.foolabs.com/xpdf/). I wrote a Ruby script epspdf with a gui Tcl/Tk wrapper epspdftk (http://tex.aanhet.net/epspdf/) for arbitrary conversions between eps, ps and pdf in any direction, with optional cropping and grayscaling. Epspdf and epspdftk are included in TeX Live. -- Siep Kroonenberg ___________________________________________________________________________________ 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 ___________________________________________________________________________________