You'll have to close the output http stream after writing the pdf otherwise there will be garbage, as an html page, after the pdf and will prevent the opening depending on the pdf viewer.
Paulo ________________________________ From: Bency Thomas [mailto:[email protected]] Sent: Tuesday, June 01, 2010 12:26 PM To: Post all your questions about iText here Subject: Re: [iText-questions] ItextSharp PDF Version issue Hi Alex, Thanks for replying. Please find attached the sample code which is creating the issue. On Tue, Jun 1, 2010 at 11:44 AM, Alexis Pigeon <[email protected]<mailto:[email protected]>> wrote: Hi Thomas, On 1 June 2010 09:28, Bency Thomas <[email protected]<mailto:[email protected]>> wrote: Hi, Iam exporting datagrid to pdf in vb.net<http://vb.net/> using itextsharp.. The pdf generated opens in pdf version 8 and above. But my clients use adobe version 7 and they are unable to open the pdf generated. The error message is "Unable to open. File is damaged or corrupted". Can u please help me with a suitable solution for this. Our crystal ball is out of service at the moment, we have no way to guess what's wrong with the generated file. Your help is greatly appreciated... You'll have to help us so that we can help you :) For example, you can send us the PDF file (beware, this is a public mailing list, make sure you don't include any confidential data). You can also provide a small stand alone piece of code that will enable us reproduce the problem. Cheers, alexis ------------------------------------------------------------------------------ _______________________________________________ iText-questions mailing list [email protected]<mailto:[email protected]> https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/ Aviso Legal: Esta mensagem é destinada exclusivamente ao destinatário. Pode conter informação confidencial ou legalmente protegida. A incorrecta transmissão desta mensagem não significa a perca de confidencialidade. Se esta mensagem for recebida por engano, por favor envie-a de volta para o remetente e apague-a do seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de usar, revelar ou distribuir qualquer parte desta mensagem. Disclaimer: This message is destined exclusively to the intended receiver. It may contain confidential or legally protected information. The incorrect transmission of this message does not mean the loss of its confidentiality. If this message is received by mistake, please send it back to the sender and delete it from your system immediately. It is forbidden to any person who is not the intended receiver to use, distribute or copy any part of this message.
------------------------------------------------------------------------------
_______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/
