[pdftex] Re: pdftex] pdftex = acrobat ?

Heiko Oberdiek oberdiek at uni-freiburg.de
Sat Oct 22 09:47:49 CEST 2005


On Sat, Oct 22, 2005 at 02:33:27AM +0200, Reinhard Kotucha wrote:

> >>>>> "Nelson" == Nelson H F Beebe <beebe at math.utah.edu> writes:
> 
>   > An easier solution to the problem of converting a collection of
>   > JPEG images to PDF files is the ImageMagick convert utility
>   > (standardly installed on GNU/Linux systems, available at
> 
> Unfortunately ImageMagick is incredibly slow and produces huge files.
> Please compare this with sam2p:
> 
>   http://www.inf.bme.hu/~pts/sam2p/
> 
> BTW, I suppose that Thierry wants to create a photo album.  To produce
> a slide show, I use pdftex directly:
> 
> slideshow.tex:
> ___________________________________________________________
> \pdfcatalog{/PageMode/FullScreen}\pdfcompresslevel=0
> \pdfhorigin0pt\pdfvorigin0pt
> 
> \def\process#1 {\setbox0\hbox{\pdfximage width 20cm {#1}%
>   \pdfrefximage\pdflastximage}%
>   \pdfpagewidth=\wd0 \pdfpageheight=\ht0 \shipout\box0\par}
> 
> \everypar{\setbox0\lastbox\process} \input dir \end
> ___________________________________________________________
> 
> Usage:
> 
> ls *.jpg > dir
> pdftex slideshow
> 
> Some remarks:
> 
>   * \pdfcompresslevel is set to 0 because compressing a JPEG file
>     means wasting time.

AFAIK pdfTeX just copies JPEG files. Thus \pdfcompresslevel only
affects the few page stream bytes.

Small variant that uses the end of line character to detect the
file name end. That allows file names with spaces:

\pdfcatalog{/PageMode/FullScreen}
\pdfcompresslevel=9
\pdfhorigin0pt
\pdfvorigin0pt

\endlinechar=-1
\obeylines
\def\process#1^^M{
  \setbox0\hbox{
    \pdfximage width 20cm {#1}
    \pdfrefximage\pdflastximage
  }%
  \pdfpagewidth=\wd0
  \pdfpageheight=\ht0
  \shipout\box0
  \par
}

\everypar{
  \setbox0\lastbox
  \process
}

\endlinechar=13 %
\input dir
\end

Yours sincerely
  Heiko <oberdiek at uni-freiburg.de>
-- 



More information about the pdftex mailing list