Mark Hammond
2009-10-22 01:47:10 UTC
I am trying to generate images of latex formulars via a java
applicationand now confronted with some strange problems when using dvipng
bundledwith miktex and texlive 2007 under windows.
The first call of dvipng hangs (generated os-process dvipng.exe via
theThe first call of dvipng hangs (generated os-process dvipng.exe via
java-application is not responding) because the a sub-process
(makepk.exe for the case that miktex is used as latex-environment)
fails(makepk.exe for the case that miktex is used as latex-environment)
to generate a certain pk-font. When calling dvipng from the cmd-shell,
then the first run of dvipng leads to a console ouput similar like
METAFONT failed for some reason....
dvipng warning: not all characters could be displayed
and new pk-fonts will be generated from dvipng. A second run of
dvipng,then the first run of dvipng leads to a console ouput similar like
METAFONT failed for some reason....
dvipng warning: not all characters could be displayed
and new pk-fonts will be generated from dvipng. A second run of
not changing the contents (the font or font size) of the .tex-files
leads to no warning or errors from dvipng.
I ran into the same issue. What I found is that even if the quiet flagleads to no warning or errors from dvipng.
(-q) is passed to dvipng, miktex-makepk.exe is being invoked with the
-verbose flag. This is causing miktex-makepk.exe to not exit. I was
able to workaround the issue in two steps:
1) When invoking dvipng it is run twice, both times with the quiet,
picky, and strict flags.
2) A wrote a proxy application which took the place of
miktex-makepk.exe. This proxy simply invoked the real makepk after
stripping the --verbose option and replacing it with the -q option.
Those two alterations made a functional workaround.
-Mark