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.
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
This message is property of ArtistForce, inc. This email and any files
transmitted with it are confidential and intended soley for the use of the
individual or entity to whom they are addressed. No addressee should forward,
print, copy, or otherwise reproduce this message in any manner that would allow
it to be viewed by any individual not originally listed as a recipient. If you
are not the intended recipient, you are hereby notified that any use
dissemination, forwarding, printing or copying of this e-mail is strictly
prohibited. If you have received this communication in error, please
immediately notify the sender and delete this message.
-
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
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.1t3xt.com/docs/book.php