[NTG-context] HZ and DVI
sanjoy at mrao.cam.ac.uk
Sat Jan 13 16:29:39 CET 2007
> on my system, when watching the file, gv issues very often some
> errors after modification of the pdf-file and that's annoying.
You're right. I guessed it might be reading a half-rewritten PDF file
before the new xref table is written (at the end of the file) and
Alas, more systematic tests of this hypothesis refuted it. I changed
the watch interval to 10 seconds (default is 1 second), to reduce the
odds that the PDF file was being rewritten while gv was reloading it.
Even that change didn't help. gv still produced tons of interpreter
errors. I guess it doesn't reread the xref table properly, or
something like that. Whatever the cause, it's a pain.
xpdf has a -remote option, so a Makefile rule could make the pdf and
then tell xpdf to reload it, via the command line. But I've never
managed to get -remote to work with xpdf.
So I'm back to the original plan of hacking xpdf to use inotify via
the inotify_init(2) and inotify_add_watch(2) syscalls (dnotify looks
like a pain to use). My inotify 'hello world' programs aren't yet
working so I have a ways to go.
`Not all those who wander are lost.' (J.R.R. Tolkien)
More information about the ntg-context