|
From: | Novice Programmer |
Subject: | Re: [Swftools-common] Re: Problem when converting PDF - SWF |
Date: | Tue, 6 May 2008 12:26:36 +0530 |
Hi,
Following is the code i'm using,
String fileName = "C:\\sample\\file.pdf"; \\ this file size is 450 KB
String fileName = "C:\\sample\\output.swf";
String[] command = new String[]{"C:\\swftools\\pdf2swf.exe", "-t", fileName, tempfile };
System.out.println("Before execution");
Process p = Runtime.getRuntime().exec(command);
p.waitFor();
System.out.println("After execution");
in = new BufferedReader(new InputStreamReader(p.getErrorStream()));
String line = in.readLine();
while (line != null)
{
line = in.readLine();
System.out.println(line);
}
System.out.println("Exit value :"+p.waitFor());
p.destroy();
Only the following line is getting printed:
[12:10:43:999]|[05-06-2008]|[SYSOUT]|[INFO]|[13]|: Before execution|
Thanks,
Eusabia
On Mon, May 5, 2008 at 11:39 PM, Matthias Kramm <address@hidden> wrote:
On Mon, May 05, 2008 at 01:58:50PM +0530, eusabia roseline <address@hidden> wrote:Sounds as if Java imposes some memory restrictions on subprocesses.
> Also, there is no problem executing the command during runtime for small PDF
> files with less pages, but only with large PDFs the problem occurs. These
> large PDFs are getting converted well when the command is executed in
> command line.
Also, it might be that for large PDFs pdf2swf is generating too
many log messages, and thus will block when the output buffer
is full.
You're using Runtime.getRunTime().exec(), right?
Are there perhaps any clues as to what's happening in
getInputStream() or getErrorStream() ?
Greetings
Matthias
[Prev in Thread] | Current Thread | [Next in Thread] |