Hi Mahaboob Pasha !
What platform are you using? Runtime.getRuntime().exec("start acrord32 /p
/h " + claim.pdf) should work in Windows 95 and Windows 98. But for
Windows 2000,NT, ME,XP it would generate an error.
You could use this code :
try{
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);
}
}
catch (IOException IOE) {
JOptionPane.showMessageDialog(null,IOE.getMessage(),"Runtime
Exception",JOptionPane.ERROR_MESSAGE);
}
thanx,
Jas
Pasha Mahaboob <[EMAIL PROTECTED]> on 06/27/2002 01:08:36 AM
To: [EMAIL PROTECTED]
cc:
Subject: Re: [iText-questions] Printing PDF
Hi JasperIan.Guela,
I tried to print the pdf file directly using the following code. Still I
couldn't able to print directly. Can you advise me what might be the
problem.
Runtime.getRuntime().exec("start acrord32 /p /h " + claim.pdf);
Thanks for your help.
Regards,
Mahaboob Pasha
-------------------------------------------------------
Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions