I found this error message when generate PDF , and i found many threads talk about this , all solutions was :
1- add response.end() after draw method
2- set visible = false
i tried the 2 solutions but none of them work. my case is different i use helper class which responsible to export my pdf and export it to stream.
using stream for 2 reasons (user need it as file attachment not open in the same page, i am using SSL), so the best way is to use :
document.Draw(HttpContext.Current.Response.OutputStream);
when add response.end or visible = false the page doesn't respond.
document is damaged and could not be repaired again !
Re: document is damaged and could not be repaired again !
Support · Sep 10, 2007Hello,
The error you are getting is most probably because of some stray HTML is getting output along with the PDF stream.
Adding the Visible = false; before the DrawToWeb method will work. Also please try changing the HTTP method of the page creating the PDF to GET from POST. If this is a form submit, change the form's "method" attribute to "GET".
Thanks,
ceTe Software Support Team.