Re: ps2pdf???



On Sun, 16 Apr 2006 14:48:43 +0000 (UTC), Ulrike Fischer
<news@xxxxxxxxxxx> wrote:

David C. Ullrich <ullrich@xxxxxxxxxxxxxxxx> schrieb:

Sorry. What detail could I provide? The error message doesn't
say anything more than "bad filename"...


Thanks for the input. I don't think that the problem
is the sort of thing you ask about below. I've of
course nonetheless answered the questions you asked,
but at the bottom of this post.

One reason I don't think that that's the problem is that
I have a similar solution that would be vulnerable to
similar problems _almost_ working. I give up on ps2pdf.bat,
look inside to see what it's doing, and try to do something
similar but simpler. If I open a DOS window, go to the
directory containing Ch2.ps, and type

gsview32 -fpdfwrite Ch2.ps

it converts the ps to pdf with no difficulty. The only
problem with that is that gsview still pops up a window
asking for the output filename.

Saying

gsview32 .setpdfwrite -f Ch2.ps

does the same thing, asks for the output name and then
does the conversion and exits. I know there _must_ be
a way to pass the output filename on the command line,
but I haven't been able to figure out what it is.
(Looking at the examples and at ps2pdfxx.bat it's
clear that gsview supports a lot more command-line
parameters than are described in the docs. The
obvious

gsview32 -fpdfwrite Ch2.ps Ch2.pdf

complains that Ch2.pdf doesn't exist - evidently it
thinks I want to convert both files to pdf. The
only place the bat files use the second parameter
is adding -sOutputFile#%2 to the command line;
I've put

-sOutputFile#Ch2.pdf

in various places, to no avail.

You don't have any idea how you pass an output filename
to gsview, I suppose?
)

Anyway:

Where is ps2pdf?

In c:\gs\gs7.03\lib

Are you sure you know that there isn't another version
somewhere that gets in the way?

Yes.

(mikTeX seems nowadays to have an own
ps2pdf

No ps2pdf in my mikTeX.

and remains of older gs-installations can mess up everything).
Does it work if you put the path to ps2pdf in the call?

No.

Is ps2pdf an .exe or a .bat?

..bat

If the second: what is the content? If it
calls other batch-files/.exe where are they?

In the same directory. On the path.

Are you sure that they
aren't other versions around?

For a second I thought maybe that was it, thanks.
There's a ps2pdf.bat and also something that appears
to be a UNIX shell script named just ps2pdf in the
same directory. I didn't think Windows was trying
to execute the shell script, and I didn't see how
that would lead to "bad filename", but it couldn't hurt
to make sure... no, spelling it out "ps2pdf.bat"
doesn't change anything.

And yes, that directory _is_ on the path. To
check, I made a hello.bat just now in the directory
that contains the only ps2pdf.bat on the machine,
with one line "echo hello". I type "hello" from
any directory at all and sure enough it echoes
"hello"...

How are you using ps2pdf on the command line?

Opening a DOS window, cd-ing to the directory
containing the ps file, typing

ps2pdf.bat Ch2.ps Ch2.pdf

and hitting Enter.

What is the path of file
you are trying to convert?

The DOS window's currect directory; "dir Ch2.ps"
displays

Ch2 PS

************************

David C. Ullrich
.



Relevant Pages

  • Re: how do I find what this computers IP address is under Vista
    ... Just for what it's worth, under Vista 32-bit Ultimate I can't get ip address info by simply typing "ipconfig" or "ipconfig /all" into the command box. ... In order to actually see the info I must type "command" in the "start search" box to get a DOS window, and then type "ipconfig /all" in the DOS window. ...
    (microsoft.public.windows.vista.general)
  • Re: Command line behavior has changed
    ... Unfortunately, in my case, even a command which includes switches will ... cause the same problem of premature DOS window closing. ... cmd /k ipconfig /all ...
    (microsoft.public.windowsxp.general)
  • Re: Command line behavior has changed
    ... Unfortunately, in my case, even a command which includes switches will ... cause the same problem of premature DOS window closing. ... cmd /k ipconfig /all ...
    (microsoft.public.windowsxp.general)
  • Re: Command line behavior has changed
    ... cmd /k ipconfig /all ... BTW the /k switch carries out the command after it and leaves the cmd window ... cause the same problem of premature DOS window closing. ... the DOS window opens and remain opened. ...
    (microsoft.public.windowsxp.general)
  • Re: Batch encode mpeg to wmv for ppc
    ... and a VB command line tool (see ... DOS batch file), using notepad. ... Just get the command line parameters (profile file, input file and ... output filename) correct once to try it out, ...
    (microsoft.public.pocketpc.multimedia)