Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to create images (actual files) using LaTeX?

27 views
Skip to first unread message

Konrad Viltersten

unread,
Jun 1, 2007, 4:07:16 AM6/1/07
to
I have a document that using PSTricks to create some
fairly advanced images (YMMV, of course). Everything
works as i'd like it to, when compiling the source code
to a PDF. As you surely have understood by now, i'm
not posting solely to inform the usenet community
about that fact. No, i have an issue and it is as follows.

I'd like to produce image files (JPG would be mostly
prefered but virtually any other format will make me
happy at this stage) from my work and be able to
present them as a set of slides, "a movie" etc.

Is it doable and if so, how? If not, why not?

--
Vänligen
Konrad
---------------------------------------------------

Sleep - thing used by ineffective people
as a substitute for coffee

Ambition - a poor excuse for not having
enough sence to be lazy
---------------------------------------------------

Guido Milanese

unread,
Jun 1, 2007, 4:19:23 AM6/1/07
to
Konrad Viltersten wrote:

> I'd like to produce image files (JPG would be mostly
> prefered but virtually any other format will make me
> happy at this stage) from my work and be able to
> present them as a set of slides, "a movie" etc.
>
> Is it doable and if so, how? If not, why not?

Did you simply try the following?

convert image.pdf image.jpg

Convert is in the imagemagick set of programs:
http://www.imagemagick.org/script/index.php

If you are on Linux you'll probably have it already installe. On othe
systems installation is easy.

HTH,
gm

--
Guido Milanese
http://docenti.unicatt.it/milanese_guido
http://www.arsantiqua.org

Alexander Grahn

unread,
Jun 1, 2007, 5:22:15 AM6/1/07
to
Try the `animate' package (available on CTAN). It creates animations
from your PSTricks sequence directly in the PDF document and plays
them in an embedded fashion. (Use AdobeReader 7 for viewing, Reader 8
is bugged.)

Alternatively you could create a multipage PDF, which contains one
frame per page. Then create a Flash file from it, using
`swftools' (http://www.swftools.org/), for embedding into html or PDF
(via LaTeX package `movie15' [available on CTAN]).

Either method preserves the original vectorial property and
scalability of the graphics (no rasterization).

Alexander

Michele Dondi

unread,
Jun 1, 2007, 8:59:29 AM6/1/07
to
On Fri, 1 Jun 2007 10:07:16 +0200, "Konrad Viltersten"
<tm...@viltersten.com> wrote:

>I'd like to produce image files (JPG would be mostly
>prefered but virtually any other format will make me
>happy at this stage) from my work and be able to
>present them as a set of slides, "a movie" etc.
>
>Is it doable and if so, how? If not, why not?

JPG?!? I would surely go with png...


Michele
--
>It's because the universe was programmed in C++.
No, no, it was programmed in Forth. See Genesis 1:12:
"And the earth brought Forth ..."
- Robert Israel in sci.math, thread "Why numbers?"

Konrad Viltersten

unread,
Jun 1, 2007, 10:05:17 AM6/1/07
to
Michele Dondi wrote/skrev/kaita/popisal/schreibt :

> On Fri, 1 Jun 2007 10:07:16 +0200, "Konrad Viltersten"
>
>> I'd like to produce image files (JPG would be mostly
>> prefered but virtually any other format will make me
>> happy at this stage) from my work and be able to
>> present them as a set of slides, "a movie" etc.
>>
>> Is it doable and if so, how? If not, why not?
>
> JPG?!? I would surely go with png...

JPG is more commonly used here but the format isn't really
an issue as long as i get to obtain the actuall image files...

Konrad Viltersten

unread,
Jun 1, 2007, 10:15:23 AM6/1/07
to
Guido Milanese wrote/skrev/kaita/popisal/schreibt :

> Konrad Viltersten wrote:
>
>> I'd like to produce image files (JPG would be mostly
>> prefered but virtually any other format will make me
>> happy at this stage) from my work and be able to
>> present them as a set of slides, "a movie" etc.
>>
>> Is it doable and if so, how? If not, why not?
>
> Did you simply try the following?
>
> convert image.pdf image.jpg
>
> Convert is in the imagemagick set of programs:
> http://www.imagemagick.org/script/index.php


Judging from the replies i suspect that i've failed to ask
the right question. I don't wonder about file format nor
do i try to create an actual animation/presentation. That
was only an example, which, obiously, didn't do the job.
Sorry for confusion.

What i was wishing for is a way of obtaining _AN_ image
file, corresponding to whatever there might be in the
image created by PSTricks.

By other words, i'd like to know how to PSTricks-ify an
illustration (to a SOMETHING-file) so that i'll be able
to do _ALL_ of the following.
a) include the image using \includegraphics
b) put the image on a webpage
c) e-mail the image to a friend
d) edit the image in, e.g. Photoshop
e) all i'm not thinking of right now but will do later :)

Is such an operation doable? (I really do hope that i
managed to make myself clear this time.)

Enrico Gregorio

unread,
Jun 1, 2007, 10:26:24 AM6/1/07
to
Konrad Viltersten <tm...@viltersten.com> wrote:

I'm thinking to

\documentclass{minimal}
\usepackage{pstricks,...}
\begin{document}
\begin{pspicture}
...
\end{pspicture}
\end{document}

and then

latex file
dvips -E -o file.eps file

Now that you have an EPS file, you can convert it into whatever format
you prefer.

Ciao
Enrico

Konrad Viltersten

unread,
Jun 1, 2007, 10:40:03 AM6/1/07
to
Enrico Gregorio wrote/skrev/kaita/popisal/schreibt :

> Konrad Viltersten <tm...@viltersten.com> wrote:
>> Guido Milanese wrote/skrev/kaita/popisal/schreibt :
>>> Konrad Viltersten wrote:
>>>
<snip>

>> By other words, i'd like to know how to PSTricks-ify an
>> illustration (to a SOMETHING-file) so that i'll be able
>> to do _ALL_ of the following.
>> a) include the image using \includegraphics
>> b) put the image on a webpage
>> c) e-mail the image to a friend
>> d) edit the image in, e.g. Photoshop
>> e) all i'm not thinking of right now but will do later :)
>>
>> Is such an operation doable? (I really do hope that i
>> managed to make myself clear this time.)
>
> I'm thinking to
>
> \documentclass{minimal}
> \usepackage{pstricks,...}
> \begin{document}
> \begin{pspicture}
> ...
> \end{pspicture}
> \end{document}
>
> and then
>
> latex file
> dvips -E -o file.eps file
>
> Now that you have an EPS file, you can convert it into whatever format
> you prefer.


I'll try to do that and let's hope that it's working. In
any case, that _SEEMS_ like the thing i ment to ask.
Once again - sorry for the confusion and thanks for
the help.

Alan Ristow

unread,
Jun 1, 2007, 11:54:05 AM6/1/07
to

You might also look into the pst-pdf package. While it is designed to
enable you to use pstricks with pdfLaTeX, a useful side-effect is that
it creates PS and PDF documents that contain nothing but your PSTricks
graphics, one to a page. You can extract the page(s) desired and convert
them to whatever format you like. Note that depending on how you create
your PSTricks graphics you might be wise to use the pdfcrop Perl script
along the way (the auto-pst-pdf package is useful for learning about
this), though if you're converting the images to another format it might
be easier to crop them, if necessary, using another tool.

Alan

Michele Dondi

unread,
Jun 1, 2007, 12:07:21 PM6/1/07
to
On Fri, 1 Jun 2007 16:15:23 +0200, "Konrad Viltersten"
<tm...@viltersten.com> wrote:

>Judging from the replies i suspect that i've failed to ask
>the right question. I don't wonder about file format nor
>do i try to create an actual animation/presentation. That
>was only an example, which, obiously, didn't do the job.
>Sorry for confusion.
>
>What i was wishing for is a way of obtaining _AN_ image
>file, corresponding to whatever there might be in the
>image created by PSTricks.

Didn't ImageMagick's convert, which someone suggested, work? How so?

Michele Dondi

unread,
Jun 1, 2007, 12:09:02 PM6/1/07
to
On Fri, 1 Jun 2007 16:05:17 +0200, "Konrad Viltersten"
<tm...@viltersten.com> wrote:

>> JPG?!? I would surely go with png...
>
>JPG is more commonly used here but the format isn't really
>an issue as long as i get to obtain the actuall image files...

The fact is that jpeg is not really well suited for *this* kind of
images: it will probably give you less compression than png and surely
degrade the quality at the same time.

Erik Quaeghebeur

unread,
Jun 1, 2007, 3:29:00 PM6/1/07
to
On Fri, 1 Jun 2007, Konrad Viltersten wrote:

> I have a document that using PSTricks to create some
> fairly advanced images (YMMV, of course). Everything
> works as i'd like it to, when compiling the source code
> to a PDF. As you surely have understood by now, i'm
> not posting solely to inform the usenet community
> about that fact. No, i have an issue and it is as follows.
>
> I'd like to produce image files (JPG would be mostly
> prefered but virtually any other format will make me
> happy at this stage) from my work and be able to
> present them as a set of slides, "a movie" etc.
>
> Is it doable and if so, how? If not, why not?

I think you're looking for the great preview-package:
<http://www.dante.de/CTAN/help/Catalogue/entries/preview.html>.

The purpose it was made for, but not limited to:
<http://www.gnu.org/software/auctex/preview-latex.html>.

I use it to get correctly boundingboxed (e)ps or pdf image files of my
individual PSTricks or pgf/TikZ-pictures to pass them along to publishers
(for \includegraphics'ing) who can't (won't) deal with anything more than
their own (sometimes horrible) style files and some standard packages.

Erik

Kjell Magne Fauske

unread,
Jun 1, 2007, 4:20:24 PM6/1/07
to
On Jun 1, 9:29 pm, Erik Quaeghebeur <equae...@nospammail.net> wrote:
> On Fri, 1 Jun 2007, Konrad Viltersten wrote:
> > I have a document that using PSTricks to create some
> > fairly advanced images (YMMV, of course). Everything
> > works as i'd like it to, when compiling the source code
>
> > I'd like to produce image files (JPG would be mostly
> > prefered but virtually any other format will make me
> > happy at this stage) from my work and be able to
> > present them as a set of slides, "a movie" etc.
>
> > Is it doable and if so, how? If not, why not?
>
> I think you're looking for the great preview-package:
> <http://www.dante.de/CTAN/help/Catalogue/entries/preview.html>.
>
> The purpose it was made for, but not limited to:
> <http://www.gnu.org/software/auctex/preview-latex.html>.
>
> I use it to get correctly boundingboxed (e)ps or pdf image files of my
> individual PSTricks or pgf/TikZ-pictures to pass them along to publishers
> (for \includegraphics'ing) who can't (won't) deal with anything more than
> their own (sometimes horrible) style files and some standard packages.
>

The preview-package is indeed a very useful package, especially when
used together with pdftex.

When generating images for use in the PGF and TIkZ gallery [1] I
maintain, I use the following command (using Ghostscript):

> gs -dNOPAUSE -r400 -dGraphicsAlphaBits=4 -dTextAlphaBits=4 -sDEVICE=png16m -sOutputFile=figure.png -dBATCH figure.pdf

(On Windows the command is gswin32c. )

You can change the DPI of the image with the -r option. I usually
create images with high resolution and then downscale them to get
better antialiasing. As input I have a PDF document with a tight
bounding box[2] created using the preview package.

[1] http://www.fauskes.net/pgftikzexamples/
[2] http://www.fauskes.net/nb/latextips/#standaloneEPSPDF

Regards,
Kjell Magne Fauske


Herbert Voss

unread,
Jun 1, 2007, 4:39:56 PM6/1/07
to
Konrad Viltersten wrote:
> I have a document that using PSTricks to create some
> fairly advanced images (YMMV, of course). Everything
> works as i'd like it to, when compiling the source code
> to a PDF. As you surely have understood by now, i'm
> not posting solely to inform the usenet community
> about that fact. No, i have an issue and it is as follows.
>
> I'd like to produce image files (JPG would be mostly
> prefered but virtually any other format will make me
> happy at this stage) from my work and be able to
> present them as a set of slides, "a movie" etc.
>
> Is it doable and if so, how? If not, why not?

use the config file
http://perce.de/LaTeX/pst-pdf/pst-pdf.cfg

and put it in your pst-pdf directory or anywhere else where
TeX will find it. Then use package pst-pdf and run ps4pdf
and you'll get single files like pictureX.eps, when you insert
at the end of your doc \savePics.

Alternative to ps4pdf run

latex <file.tex>
dvips -Ppdf -o <file-pics.ps> <file.dvi>
ps2pdf -dAutoRotatePages=/None <file-pics.ps> <file-pics.pdf>
pdflatex --shell-escape <file.tex>


Herbert


--
http://PSTricks.tug.org
http://tug.org/CTAN/info/math/voss/

Konrad Viltersten

unread,
Jun 1, 2007, 6:25:25 PM6/1/07
to
Herbert Voss wrote/skrev/kaita/popisal/schreibt :
> Konrad Viltersten wrote:

>> I have a document that using PSTricks to create some
>> fairly advanced images (YMMV, of course). Everything
>> works as i'd like it to, when compiling the source code
>> to a PDF. As you surely have understood by now, i'm
>> not posting solely to inform the usenet community
>> about that fact. No, i have an issue and it is as follows.
>>
>> I'd like to produce image files (JPG would be mostly
>> prefered but virtually any other format will make me
>> happy at this stage) from my work and be able to
>> present them as a set of slides, "a movie" etc.
>>
>> Is it doable and if so, how? If not, why not?
>
> use the config file
> http://perce.de/LaTeX/pst-pdf/pst-pdf.cfg
>
> and put it in your pst-pdf directory or anywhere else where
> TeX will find it. Then use package pst-pdf and run ps4pdf
> and you'll get single files like pictureX.eps, when you insert
> at the end of your doc \savePics.

I'm getting errors as the command \savePics does not get
recognized as a valied control sequence. My guess is that
i haven't placed the file pst-pdf.cfg in a right spot. Can
there be an other explanation?

I placed the \savePics _exactly_ at the en of the document,
as you told me to - the only line after it is \end{document}.

I tried to put the file in the same directory as an other
CFG-file i've found in the MiKTeX directory structure,
if that's of any help.

> Alternative to ps4pdf run
> latex <file.tex>
> dvips -Ppdf -o <file-pics.ps> <file.dvi>
> ps2pdf -dAutoRotatePages=/None <file-pics.ps> <file-pics.pdf>
> pdflatex --shell-escape <file.tex>

--

Konrad Viltersten

unread,
Jun 1, 2007, 6:43:28 PM6/1/07
to
Konrad Viltersten wrote/skrev/kaita/popisal/schreibt :

> Herbert Voss wrote/skrev/kaita/popisal/schreibt :
>> Konrad Viltersten wrote:
>
<snip>

>>> I'd like to produce image files (JPG would be mostly
>>> prefered but virtually any other format will make me
>>> happy at this stage) from my work and be able to
>>> present them as a set of slides, "a movie" etc.
>>>
>> use the config file
>> http://perce.de/LaTeX/pst-pdf/pst-pdf.cfg
>>
>> and put it in your pst-pdf directory or anywhere else where
>> TeX will find it. Then use package pst-pdf and run ps4pdf
>> and you'll get single files like pictureX.eps, when you insert
>> at the end of your doc \savePics.
>
> I'm getting errors as the command \savePics does not get
> recognized as a valied control sequence. My guess is that
> i haven't placed the file pst-pdf.cfg in a right spot. Can
> there be an other explanation?
>
> I placed the \savePics _exactly_ at the en of the document,
> as you told me to - the only line after it is \end{document}.
>
> I tried to put the file in the same directory as an other
> CFG-file i've found in the MiKTeX directory structure,
> if that's of any help.
>
1] latex <file.tex>
2] dvips -Ppdf -o <file-pics.ps> <file.dvi>
3] ps2pdf -dAutoRotatePages=/None <file-pics.ps> <file-pics.pdf>
4] pdflatex --shell-escape <file.tex>

I also tried to play around and moved the \savePics outside
the scope of the document. That gave me a better result
while doing the [1] and [2], so get the PS-file looking just
as it's supposed to.

Then, when i try the [3] i get error looking like
Error: /undefinedfilename in (/None)
and then the tale dies. What should i do?

Gernot Hassenpflug

unread,
Jun 2, 2007, 2:11:53 AM6/2/07
to
"Konrad Viltersten" <tm...@viltersten.com> writes:

I cannot help you yet, sorry. But:

Please post minimal full example. Also what your OS and program
versions are. Below is a link to gs 8.54 ps2pdf documentation:

http://ghostscript.com/doc/8.54/Ps2pdf.htm

I recommend also to bookmark the base link and spend a few minutes a
day or so familiarizing yourself with gs and its many utilities. I
guarantee it is invested time well spent.

Regards,
Gernot
--
Grrr!! ...Pick a reason...

Herbert Voss

unread,
Jun 2, 2007, 2:14:06 AM6/2/07
to
Konrad Viltersten wrote:

>> I tried to put the file in the same directory as an other
>> CFG-file i've found in the MiKTeX directory structure,
>> if that's of any help.

did you updated the file data base?


> 1] latex <file.tex>
> 2] dvips -Ppdf -o <file-pics.ps> <file.dvi>
> 3] ps2pdf -dAutoRotatePages=/None <file-pics.ps> <file-pics.pdf>
> 4] pdflatex --shell-escape <file.tex>
>
> I also tried to play around and moved the \savePics outside
> the scope of the document. That gave me a better result
> while doing the [1] and [2], so get the PS-file looking just
> as it's supposed to.
>
> Then, when i try the [3] i get error looking like
> Error: /undefinedfilename in (/None)
> and then the tale dies. What should i do?

you can try it with this example file

\listfiles
\documentclass[a4paper,10pt,ngerman]{article}
\usepackage[T1]{fontenc}
\usepackage{pst-pdf}
\usepackage{pstricks-add}

\begin{document}

\begin{pspicture}(-0.5,-0.75)(2,2)
\psaxes{->}(0,2)
\psline[linewidth=1.5pt](2,2)
\end{pspicture}

\savePics
\end{document}


the \savePics command is only active in the last pdflatex
run and can only work when the image container was succfull
created with the ps2pdf command.
With this example I got a picture1.eps file.

Gernot Hassenpflug

unread,
Jun 2, 2007, 4:01:47 AM6/2/07
to
Herbert Voss <herb...@googlemail.com> writes:

Hi, on my Debian unstable i386 system with TeXLive 2007 I followed the
example (saved as pdftest.tex) and follow the below steps:

,----
| (pst-pdf) ----------------------------------------------------
| (pst-pdf) latex pdftest.tex
| (pst-pdf) dvips -o pdftest-pics.ps pdftest.dvi
| (pst-pdf) ps2pdf pdftest-pics.ps
| (pst-pdf) ----------------------------------------------------
`----

It works, but I do get an error on \savePics in the initial latex run,
which I ignore (press ENTER) and output is successfully created. A
similar error occurs in the last run of "pdflatex --shell-escape
pdftest.tex", shown below. I press ENTER at the question mark and the
program continues to completion.

,----
| ...
| <use pdftest-pics.pdf, page 1>
| ! Undefined control sequence.
| l.14 \savePics
|
| ?
| [1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map} <./pdftest-pics.pdf>]
| (./pdftest.aux)
|
| *File List*
| article.cls 2005/09/16 v1.4f Standard LaTeX document class
| size10.clo 2005/09/16 v1.4f Standard LaTeX file (size option)
| fontenc.sty
| t1enc.def 2005/09/27 v1.99g Standard LaTeX file
| pst-pdf.sty 2006/08/31 v1.1o PS graphics for pdfLaTeX (RN,HjG)
| graphicx.sty 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
| keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
| graphics.sty 2006/02/20 v1.0o Standard LaTeX Graphics (DPC,SPQR)
| trig.sty 1999/03/16 v1.09 sin cos tan (DPC)
| graphics.cfg 2007/01/18 v1.5 graphics configuration of teTeX/TeXLive
| pdftex.def 2007/01/08 v0.04d Graphics/color for pdfTeX
| pstricks.sty 2006/08/10 v0.32 LaTeX wrapper for `PSTricks' (RN,HV)
| pstricks.tex 2006/12/22 v1.15 `PSTricks' (tvz)
| xcolor.sty 2005/12/21 v2.09 LaTeX color extensions (UK)
| color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
| preview.sty 2006/05/25 11.83 (AUCTeX/preview-latex)
| dvips.def 1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
| pstricks-add.sty 2005/03/03 package wrapper for pstricks-add.tex (hv)
| pstricks-add.tex 2006/11/22 v2.82 `PSTricks-add' (hv,dr)
| pst-xkey.tex 2005/11/25 v1.6 PSTricks specialization of xkeyval (HA)
| xkeyval.sty 2006/11/18 v2.5f package option processing (HA)
| xkeyval.tex 2006/11/18 v2.5f key=value parser (HA)
| supp-pdf.tex
| pdftest-pics.pdf Graphic file (type pdf)
| ***********
|
| ){/usr/share/texmf/fonts/enc/dvips/cm-super/cm-super-t1.enc}</usr/share/texmf-
| texlive/fonts/type1/bluesky/cm/cmr10.pfb></usr/share/texmf/fonts/type1/public/c
| m-super/sfrm1000.pfb>
| Output written on pdftest.pdf (1 page, 8059 bytes).
| Transcript written on pdftest.log.
`----

Herbert Voss

unread,
Jun 2, 2007, 4:30:28 AM6/2/07
to
Konrad Viltersten wrote:

> I placed the \savePics _exactly_ at the en of the document,
> as you told me to - the only line after it is \end{document}.
>
> I tried to put the file in the same directory as an other
> CFG-file i've found in the MiKTeX directory structure,
> if that's of any help.

I do not use MikTeX, maybe that there is a problem with the
optional arguments under Windows. The config file which use
the command

pdftops -f 1 -l 1 -eps <pdffile>

with

latex <file.tex>
dvips -Ppdf -o <file-pics.ps> <file.dvi>
ps2pdf -dAutoRotatePages=/None <file-pics.ps> <file-pics.pdf>

you'll get the image-conatiner file-pics.pdf, which collects
_all_ images as single pdf pages. You can convert each page with
pdftops, for example the third image

pdftops -f 3 -l 3 -eps <pdffile>

\savePics does nothing else than using this command in
a loop for all images.

Konrad Viltersten

unread,
Jun 2, 2007, 7:14:33 AM6/2/07
to
Herbert Voss wrote/skrev/kaita/popisal/schreibt :
> Konrad Viltersten wrote:


All right, i corrected a bunch of errors and i get a PDF-file
called test03-pics.pdf containing one image per page (each
page totally filled by its image). However, i still don't get
any EPS-files...

Also, for some reason, the commands nag that i can't use
\write18 and need to use --shell-escape, which i do, as i've
been told to... What more can i do?

Konrad Viltersten

unread,
Jun 2, 2007, 7:56:36 AM6/2/07
to
Herbert Voss wrote/skrev/kaita/popisal/schreibt :


Hmm... Looks like i don't have pdftops on my computer. May
i drop by and borrow yours, mr Voss? :)

Let's hope there is such an utility for WindowsXP...

Konrad Viltersten

unread,
Jun 2, 2007, 8:05:03 AM6/2/07
to
Herbert Voss wrote/skrev/kaita/popisal/schreibt :

> The config file which use the command
>
> pdftops -f 1 -l 1 -eps <pdffile>
>
> with
>
> latex <file.tex>
> dvips -Ppdf -o <file-pics.ps> <file.dvi>
> ps2pdf -dAutoRotatePages=/None <file-pics.ps> <file-pics.pdf>
>
> you'll get the image-conatiner file-pics.pdf, which collects
> _all_ images as single pdf pages.

So basically, what i understand is that my issue right now is
simply this - how to convert an PDF-file to a series of images
(JPG, preferably, but EPS works great too) while working
under WindowsXP. Thoughts?

> You can convert each page with
> pdftops, for example the third image
>
> pdftops -f 3 -l 3 -eps <pdffile>
>
> \savePics does nothing else than using this command in
> a loop for all images.


It seems that pdftops doesn't exist for WinXP. Anybody
having suggestions how to deal with that?

By the way - great thanks for helping!

Jean Magnan de Bornier

unread,
Jun 2, 2007, 11:46:23 AM6/2/07
to
"Konrad Viltersten" <tm...@viltersten.com> wrote :

| So basically, what i understand is that my issue right now is
| simply this - how to convert an PDF-file to a series of images
| (JPG, preferably, but EPS works great too) while working
| under WindowsXP. Thoughts?

The ImageMagick package, which exists for all usual platforms, has a
command "convert" for this.

cheers,
--
Jean

Konrad Viltersten

unread,
Jun 2, 2007, 7:19:40 PM6/2/07
to
"Jean Magnan de Bornier" <je...@bornier.net> skrev i meddelandet >

Looking at their site i think to myself - "boy, that one heavy
tool for my simple task..." - but if there's nothing else to use,
then it'll be it. First thing in the morning!

Thanks.

Konrad Viltersten

unread,
Jun 3, 2007, 2:15:50 AM6/3/07
to
Jean Magnan de Bornier wrote/skrev/kaita/popisal/schreibt :


I've been sitting with the ImageMagick for a few minutes now
and of what i can understand, it can't read PDF-files. Have i
misunderstood something, perhaps?

How exactly would one go about an operation that i've
described, using ImageMagick? I start it as an external,
stand-alone application, since that's what i've read on their
webpage. Is it correct?

Kjell Magne Fauske

unread,
Jun 3, 2007, 3:29:49 AM6/3/07
to
On Jun 3, 8:15 am, "Konrad Viltersten" <t...@viltersten.com> wrote:
>
> I've been sitting with the ImageMagick for a few minutes now
> and of what i can understand, it can't read PDF-files. Have i
> misunderstood something, perhaps?
>

ImageMagick uses Ghostscript to do the conversion from PDF and PS/EPS
to bitmap formats. Take a look in the file delegates.xml to see the
details. It basically runs the same command as I posted earlier.

The problem may be that ImageMagick can't find the gs or gswin32c
executable.

Regards,
Kjell Magne Fauske

Herbert Voss

unread,
Jun 3, 2007, 1:46:04 PM6/3/07
to

for Windows yiu must use

ps2pdf -dAutoRotatePages#/None <file-pics.ps> <file-pics.pdf>

Patrick TJ McPhee

unread,
Jun 3, 2007, 8:25:19 PM6/3/07
to
In article <5cf4leF...@mid.individual.net>,
Konrad Viltersten <tm...@viltersten.com> wrote:
% Jean Magnan de Bornier wrote/skrev/kaita/popisal/schreibt :
%
% > "Konrad Viltersten" <tm...@viltersten.com> wrote :
% >
% >> So basically, what i understand is that my issue right now is
% >> simply this - how to convert an PDF-file to a series of images
% >> (JPG, preferably, but EPS works great too) while working
% >> under WindowsXP. Thoughts?
% >
% > The ImageMagick package, which exists for all usual platforms,
% > has a command "convert" for this.

I'd say that imagemagick is not particularly useful for this job. It needs
ghostscript to do anything with pdf files, and ghostscript can write to
output formats you want.

For what it's worth, pdftops is available for Windows. See
ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.02-win32.zip

It's enough if you want to get eps files, but not necessary if you already
have ghostscript. The simplest way to convert all the pages of a pdf file to
a graphic format is to use gs from the command-line:
gs -sOutputFile=file-page%02d.png -sDEVICE=pngalpha -r300 -dNOPAUSE file.pdf

For text and line-art graphics, png is a superior format to jpeg.
--

Patrick TJ McPhee
North York Canada
pt...@interlog.com

Konrad Viltersten

unread,
Jun 5, 2007, 2:05:21 AM6/5/07
to
Herbert Voss wrote/skrev/kaita/popisal/schreibt :


I still get errors. Something about
-dvar=name requires name=null, true or false

The whole affair turned out to be a lot more complicated
than what i originally expected. I'm guessing, i had a
miscarriage for an idea, hehe.

Herbert Voss

unread,
Jun 5, 2007, 2:27:50 AM6/5/07
to
Konrad Viltersten wrote:

>> ps2pdf -dAutoRotatePages#/None <file-pics.ps> <file-pics.pdf>
>
>
> I still get errors. Something about
> -dvar=name requires name=null, true or false

I have no crystal ball ...

>
> The whole affair turned out to be a lot more complicated
> than what i originally expected. I'm guessing, i had a
> miscarriage for an idea, hehe.

No, this is what I do everytime when submitting an article
with the graphics as single files. It alsways works for me.

Konrad Viltersten

unread,
Jun 5, 2007, 3:22:20 AM6/5/07
to
Patrick TJ McPhee wrote/skrev/kaita/popisal/schreibt :
> In article <5cf4leF...@mid.individual.net>,


Thanks. It worked! It was one heavy offspring to a
woman working nights in the entertainment business
to get it working, most likley due to my sorry
incompetence. Great appreciation to all who sweated
with me. Thank you.

Konrad Viltersten

unread,
Jun 5, 2007, 3:49:35 AM6/5/07
to
Herbert Voss wrote/skrev/kaita/popisal/schreibt :
> Konrad Viltersten wrote:

>>> ps2pdf -dAutoRotatePages#/None <file-pics.ps> <file-pics.pdf>
>>
>>
>> I still get errors. Something about
>> -dvar=name requires name=null, true or false
>
> I have no crystal ball ...

I guess i was hoping for a general, well-known error. You
have to admit that sometimes you make an educated guess
that is 100% right. Anyway, combining what you've written
before with some other hints, i finally got what i wished.
Couldn't do that without the help. Thanks!

0 new messages