[NTG-pdftex] \pdffiledump (was: Patch EscapeAndOther)

Heiko Oberdiek oberdiek at uni-freiburg.de
Mon Jul 4 13:14:39 CEST 2005


On Sat, Jul 02, 2005 at 09:43:34PM +0200, Martin Schröder wrote:

> On 2005-06-25 03:52:01 +0200, Heiko Oberdiek wrote:
> > New in patch EscapeAndOther:
> >   * \pdfcreationdate
> >   * \pdffilemoddate
> >   * \pdffilesize
> >   * \pdfmdfivesum
> >   * \pdffiledump
> >   * \pdfshellescape
> >   * \pdfmatch and \pdflastmatch
> >   * Start with bug fix: quotes are legal in other operating
> >     systems than windows.
> 
> And \pdffiledump. What does it do?

Sorry, I have forgotten the description:

\pdffiledump [offset <int>] [length <int>] <general text>

It returns a hex dump of file, given in <general text>,
starting at given offset or 0 with given length.

\pdffiledump length 20 {abc.bmp}

Reads the first twenty bytes of abc.bmp in binary mode and
returns them as hex string.

Uses: a lot, eg. inspecting the file header to get
size information of bitmap files (eg. for latex/dvips).
Or it could be used to read ucs2/4 files, recode them
and reading (\scantokens, \pdfunescapehex) them as utf-8.

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


More information about the ntg-pdftex mailing list