Michael Hüttermann wrote:

Dear pdf experts,

I have an issue opening a pdf-file in java on windows the straight way. I do it this way Runtime.getRuntime().exec( "cmd /c start acrord32 " \"" + fileName + "\""); //fileName e.g. test.pdf

Adobe reader opens but with a message dialog (I translated with original german message into this english): "acrobat could not open "test.pdf", because the file type is not supported or the file is damaged (e.g. if it is sent as email attachement and ws not decoded correctly."

After touching with my java exec the pdf-file cannot be opened via windows directly any more. When I open the document it has another decoding now (many black rectangles with some strange other characters, the lines are pretty short now).

I really don't know what could be happening.
You are creating a file test.pdf.
I assume you can open it before the exec.
Can you open it from a DOS box with cmd /c start acrord32 ?
Does this command make the PDF corrupt?
What if you make a simple standalone Java program
and do the exec. Does this make the PDF corrupt?
I think it's not the 'touching' with java exec that causes
the problem, but that something else is happening along
the way (be it in your Java program or by something
that is active in your Operating System).
br,
Bruno


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to