[NTG-pdftex] pdfximage

Hartmut Henkel hartmut_henkel at gmx.de
Mon Aug 28 23:01:16 CEST 2006


On Mon, 28 Aug 2006, Hans Hagen wrote:
> Hartmut Henkel wrote:
> > On Mon, 28 Aug 2006, Hans Hagen wrote:
> >
> >> It's kind of annoying that pdftex has hard coded suffixes.
> >>
> >> how about something
> >>
> >> \pdfjpgsuffixes{jpg,jpeg,myjpg}
> >> \pdfpngsuffixes{png,somepng}
> >> \pdfpdfsuffixes{pdf,epdf,fdf}
> >
> > but you know that the suffixes are used only as a last resort, as
> > first the file headers are checked for the file type (thanks to
> > Heiko!). So e. g. foo.somejpg is a legal name and would still be
> > recognized as .png if it's a png file :-)
>
> when i test with a unknown format, i get an abort and:
>
> Error: pdftex.exe (file ./hakker1b.tif): unknown type of image
>
> so, in order to know if a funny suffix is a valid one for pdftex, we
> need something
>
> \pdfcheckimage{somefile.somesiffix}
>
> which sets a flag, say \pdfimagecheck 0/1

like

\pdfretval=-1 not recognized
\pdfretval=0 PDF
\pdfretval=1 PNG
\pdfretval=2 JPG
\pdfretval=3 JBIG2

or better 0,1,2,3,4?

Regards, Hartmut


More information about the ntg-pdftex mailing list