![](https://secure.gravatar.com/avatar/c4fb1aecd98bbaa9856f8c421db294e0.jpg?s=120&d=mm&r=g)
5 Jul
2004
5 Jul
'04
6:29 p.m.
On Mon, Jul 05, 2004 at 06:12:27PM +0200, Hans Hagen wrote:
ah, i thought that -2 would also be set if pdftex had problems with the pdf file (xpdf lib error)
Currently such errors are fatal errors. I have not looked into
the sources if recovery from such errors is possible. If yes,
then \pdflastximagepages is a bad choice for signaling such
errors, because only a page can be faulty, the number of
pages can be still correct.
Perhaps we need a kind of "errno" variable for signaling
errors. Then \pdflastximagepages contains the correct number or
-1 for "unknown". "errno" contains "0" in case of success of
the last operation or a error number (file not found,
corrupted pdf file, invalid page, ...)
Yours sincerely
Heiko