print a pdf file

A

amaresh

I am trying to execute a pdf file from java program in
windows 2000 using the command

"cmd.exe /C acrord32.exe //p file.pdf"

But it is not working.why???
 
G

Gary Smith

amaresh said:
I am trying to execute a pdf file from java program in
windows 2000 using the command
"cmd.exe /C acrord32.exe //p file.pdf"
But it is not working.why???

First of all, the Acrobat reader is probably not in your path, so you'll
need to fix that or supply the fully qualified filename -- something like
"D:\Program Files\Adobe\Acrobat 6.0\Reader\AcroRd32.exe". Note the use of
quotes to deal with embedded spaces. The next problem may be the "//p".
Unless java removes one of the slashes that will only get you "This file
cannot be found."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top