ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Convert eps to pdf
@ 2010-11-22 10:51 Alan BRASLAU
  2010-11-22 11:02 ` Mojca Miklavec
  0 siblings, 1 reply; 3+ messages in thread
From: Alan BRASLAU @ 2010-11-22 10:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Convert eps to pdf
  2010-11-22 10:51 Convert eps to pdf Alan BRASLAU
@ 2010-11-22 11:02 ` Mojca Miklavec
  2010-11-22 15:38   ` Siep Kroonenberg
  0 siblings, 1 reply; 3+ messages in thread
From: Mojca Miklavec @ 2010-11-22 11:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Convert eps to pdf
  2010-11-22 11:02 ` Mojca Miklavec
@ 2010-11-22 15:38   ` Siep Kroonenberg
  0 siblings, 0 replies; 3+ messages in thread
From: Siep Kroonenberg @ 2010-11-22 15:38 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-11-22 15:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-22 10:51 Convert eps to pdf Alan BRASLAU
2010-11-22 11:02 ` Mojca Miklavec
2010-11-22 15:38   ` Siep Kroonenberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).