[NTG-context] Convert eps to pdf

2010-11-22 Thread Alan BRASLAU
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.

I am posting this question to the ConTeXt mailing list
as I am sure that someone can give a trivial answer,
but also to indicate to those who may ignore this robust
feature of ConTeXt.

Also, \externalfigure is a very powerful macro that would justify
more complete documentation in the revised reference manual.

Alan
___
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
___


Re: [NTG-context] Convert eps to pdf

2010-11-22 Thread Mojca Miklavec
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.

Mojca
___
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
___


Re: [NTG-context] Convert eps to pdf

2010-11-22 Thread Siep Kroonenberg
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
___