Hi,

I have a problem when calling pdf2swf from java. When i converting bigger file 
it freeze, but when i make it from command line it works fine.

Some ideas?

 

Here is the code i use:

try 

{

Process proc = Runtime.getRuntime().exec(command.toString());  

BufferedWriter writer = new BufferedWriter(new 
OutputStreamWriter(proc.getOutputStream()) );  

   

String message = "SC";  

writer.write(message, 0, 1); 

logger.debug("\n\twaiting while convert finish --->"+new Date());

Timer timer = new Timer();

timer.schedule(new InterruptScheduler(Thread.currentThread()), TIMEOUT);

try 

{

                        proc.waitFor();

                        logger.debug("\n\tconvert done --->"+new Date());

                        System.out.println("\n\thotovo...");  

                        return saveFilename;

} 

catch (InterruptedException e) 

{

                        // Stop the process from running

                        logger.debug("\n\ttimeout expired --->"+new Date());

                         proc.destroy();

                         return "errorPdf2swf";

} 

finally 

{

                         // Stop the timer

                         timer.cancel();

}

}  

catch (Exception e) 

{  

              e.printStackTrace();  

}  

                    

return null;

 

 

Thanks for help

 

Stetka

-

Trask solutions  |  www.trask.cz <http://www.trask.cz/> 

Klostermanova 690/15

460 01 Liberec, Česká republika

T +420 725 722 990 F +420 220 414 127 

-

enabling innovation 

 

Reply via email to