![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
Heiko Oberdiek wrote:
\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.
often one needs more trickery to get a size due to the fact that many bitmap formats are linked lists of tagged records; i suppose that reading in a 400K file has some mem penalty -) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------