1. Does this happen with every PDF?
2. and i hope that you are not calling this code from some webservice. if it
so, you may want to check the permissions that webservice Worker process
has(it must have execute and write permissions). but again if this is the
case then every pdf would fail so my Question 2 holds only if the answer to
Question 1 is yes.
Thanks.
On 5/6/08, eusabia roseline <[EMAIL PROTECTED]> wrote:
>
> 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 <[EMAIL PROTECTED]> wrote:
>
> > On Mon, May 05, 2008 at 01:58:50PM +0530, eusabia roseline <
> > [EMAIL PROTECTED]> wrote:
> > > 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.
> >
> >
> > Sounds as if Java imposes some memory restrictions on subprocesses.
> > 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
> >
> >
> >
> >
>
--
Thanks & Regards,
Novice (http://ishuonweb.wordpress.com/).