Yes,
Download File was created by PdfStamper Class using Java.
Following is a code
PdfReader readpdf = new
PdfReader(pdfFolderPath+fileName+".pdf");
File file = new
File(pdfFolderPath+fileName+"_new.pdf");
PdfStamper stamp=new PdfStamper(readpdf,new
FileOutputStream(file));
AcroFields form=stamp.getAcroFields();
form.setFieldProperty(dto.getName(), "setfflags",
PdfFormField.FF_READ_ONLY, null);
stamp.close();
readpdf.close();
//Download that file.
this.response.setHeader("Content-Disposition",
"attachment;filename="+fileName+".pdf");
fileData = new byte[(int)file.length()];
in = new ByteArrayInputStream(fileData);
byte[] outputByte = new byte[4096];
//copy binary contect to output stream
while(in.read(outputByte, 0, 4096) != -1){
outputStream.write(outputByte, 0, 4096);
}
in.close();
outputStream.flush();
outputStream.close();
I hope that now you understand my problem...
Plz. point out to me that where I m wrong?
Thanks & Regards,
On Fri, Dec 2, 2011 at 7:20 AM, Alexis Pigeon <[email protected]>wrote:
> Hi Anand,
>
>
> On 2 December 2011 15:51, Khatri Anand <[email protected]> wrote:
>
>> Hi,
>>
>> In my application I download pdf file. That file store into particular
>> Directory..
>> But when I open that file into Adobe Reader I got the Error Message.
>>
>> *"Adobe Reader could not open 'poolcuetip_data(1).pdf' because it is
>> either not a supported file type or because the file has been damaged (for
>> example. it was sent as an email attachment and wasn't correctly decoded).
>> *"
>>
>> How to solve this issue.
>>
>
> What makes you think this ever relates to iText?
> Maybe there is some interaction with iText you don't mention (Is the file
> generated with iText? Which version? What is the Java / C# code?).
> Or maybe you should ask this to another mailing list.
>
> Anyway, all our crystal balls are broken right now, we can't guess any
> further :)
>
> Cheers,
> alexis
>
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure
> contains a definitive record of customers, application performance,
> security threats, fraudulent activity, and more. Splunk takes this
> data and makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered with a
> reference to the iText book: http://www.itextpdf.com/book/
> Please check the keywords list before you ask for examples:
> http://itextpdf.com/themes/keywords.php
>
--
*Anand Khatri*
Software Consultant
ZEITECH Solutions,
Ahmedabad.
Ph : *+91 8000008071**
<http://www.intecllc.com/>*
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php