Hi!
I'm having trouble when I want to print my pdf documents.
I try to use the code in faq section of the Itext homepage.
String osName = System.getProperty("os.name" );
//FOR WINDOWS 95 AND 98 USE COMMAND.COM
if( osName.equals( "Windows 95" ) || osName.equals( "Windows 98" )){
Runtime.getRuntime().exec("command.com /C start acrord32 /p /h" + claim.pdf);
}
//FOR WINDOWS NT/XP/2000 USE CMD.EXE
else {
Runtime.getRuntime().exec("cmd.exe /C acrord32 /p /h" + claim.pdf);
}
I have also tried with and without the /p /h syntax
The thing that happens is that the command window blinks a half second and nothing
more. No exeption is either thrown.
I have also tried some different approaches to start acrobat with and without a file
as an argument.
This one
Runtime.getRuntime().exec("acrord32 EXPORT.pdf");
or this one
Runtime.getRuntime().exec("start EXPORT.pdf");
However, this is the only one that work
Runtime.getRuntime().exec("C:\\Program Files\\Adobe\\Acrobat 5.0\\Reader\\acrord32.exe
/p EXPORT.pdf");
It seams that windows cant find the path to the acrobat reader executable. I run
windows NT.
Is there a way to somehow change settings,paths or something. So that the system knows
which application to launch when I type acrord32 in the command line.
Thanks
/Filip
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions