I'm using ASP.NET 2.0, and using ViewState to store some stuff I'm pulling from a database to display in my PDF. If I add more than 10 viewstate variables, the PDF won't load and I get an error that says 'File is damaged and could not be repaired' from Acrobat Viewer. It doesn't matter if the 11th viewstate variable is assigned a value from the database or is hardcoded. Any viewstate item beyond the 10th will cause this.
You can see the error here:
http://216.182.80.247/chaffey/pdftest.aspx?comid=9&homeid=4
Please advise. Thanks.
Chad
ViewState and 'File is damaged and could not be repaired' message
Re: ViewState and 'File is damaged and could not be repaired' message
Support · Nov 24, 2006Hello Chad,
Please try adding the Visible = false; right after the DrawToWeb method of the document object. This may solve the problem you are having.
Thanks,
ceTe Software Support Team.
Re: ViewState and 'File is damaged and could not be repaired' message
Forum member · Nov 27, 2006Looks like that worked. Thanks!