Hi,
I have Acrobat7.0 install in my computer. I want to generate a PDF document. i
have the following code in java to generate
the PDF. The library that i am using is iText-2.0.8.jar
if(format.equalsIgnoreCase("pdf"))
{
response.setContentType("application/pdf");
File file = new File(docPath);
if(file == null || !file.exists())
{
errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(
"mydocument.filenotfound.problem"));
saveErrors(request, errors);
return mapping.getInputForward();
}
FileInputStream is = new FileInputStream(file);
int read = 0;
byte[] bytes = new byte[1024];
while((read = is.read(bytes)) != -1)
{
out.write(bytes , 0 , read);
}
is.close();
out.flush();
out.close();
return null;
}
When i am trying to generate the PDF in firefox windows, i am getting the
message: "Acrobat Plugin: This operation is not allowed" and in IE i am getting
the message"File does not begin with '%PDF-'.
Any insight would be appreciated.
Thanks
Tanmayee-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.1t3xt.com/docs/book.php