[l2h] Shall pstoimg.bat really call ghostscript and pass a command-line for pnmcrop to it ?

Ulrich Diez ulrich.diez@student.uni-tuebingen.de
Fri, 14 Jun 2002 00:37:51 +0200


These days I'm trying to install Latex2HTML on a Win95-machine.
As Image-Conversion still fails, I have a few questions:

1) Shall pstoimg.bat really call ghostscript  and pass a command-line for
    pnmcrop to it ? Is it really necessary to change path-delimiters to
    '/' from within GhostScript ?
2) If so: What would be the correct syntax from within ghostscript for
     launching pnmcrop.exe (from another Drive) with the appropriate 
     parameters ?  Where else could I find these informations?/Are there
     any good free GhostScript-Tutorials on the Web ?
3) If so this would imply that I sholud get more familiar with Perl in
    order to create a fix which does some path-conversion before passing
     it to ghostscript. Are there any good free Perl-tutorials on the Web ?

In case somebody likes reading large epics and wants to know how 
these questions came into being, I will now tell the whole story:

These days I'm trying to get Latex2HTML running on a Win'95-ma-
chine. Running config.bat and reading config.log show no errors.
At least some text is now converted to HTML.
Nevertheless image-conversion from within test.bat fails as I receive
an Error-Message: "No such file or directory" which seems to be pro-
duced by DOS-command.com.

When I run test.bat with the -debug switch, I can see that it calls
pstoimg.bat for image-conversion.
Right before the very first error-message occurs, I can read a line 
which is produced by pstoimg.bat while gswin32c.exe is running:

GS> C:\Netpbm\Bin\PNMCROP.EXE  < C:\WINDOWS\TEMP\l2h863757\p915977.pnm > C:\WINDOWS\TEMP\l2h863757\p915977.t01

Somewhere in pstoimg.bat I read the following:

# Ghostscript understands only '/' as path delimiter!

As I am not familiar with Ghostscript and Perl at all, I tried the fol-
lowing:

a)

I launched a DOS-BOX.

On the DOS-Prompt (C:\) I typed following command:

C:\Netpbm\Bin\PNMCROP.EXE  < C:\WINDOWS\TEMP\l2h863757\p915977.pnm > C:\WINDOWS\TEMP\l2h863757\p915977.t01

The result was that the already existing file
"C:\WINDOWS\TEMP\l2h863757\p915977.t01" was changed in size
and last modification-date. No error-messages occured.

b)

Afterwards I launched gswin32c.exe from the command-line.

On the Ghostscript-Prompt (GS>) I typed the same. (also
C:\Netpbm\Bin\PNMCROP.EXE  < C:\WINDOWS\TEMP\l2h863757\p915977.pnm > C:\WINDOWS\TEMP\l2h863757\p915977.t01)

The result was some -for me- ununderstandable output. Among many 
other stuff there was the line

"LAST OS error: No such file or directory" .

Now I assume the following:

During the image-conversion-process pstoimg.bat is invoked. Among 
other things pstoimg.bat calls gswin32c.exe and passes the following 
command-line to it:
C:\Netpbm\Bin\PNMCROP.EXE  < C:\WINDOWS\TEMP\l2h863757\p915977.pnm > C:\WINDOWS\TEMP\l2h863757\p915977.t01
The execution of this command-line fails due to the fact that the wrong 
path-delimiters are used. Therefore gswin32c.exe passes an error to 
DOS/pstoimg.bat and the resulting output is the error-message
"No such file or directory" . As consequence image-conversion fails
and subsequent error-messages follow.

Thank you very much in advance.
Yours sincerely

Ulrich Diez