Problem with generation of PDF from Word

Hi,
I am generating the PDF from word document.If i first generate the PDF it is work perfectly. when i added another code to this application to generate word document then the PDF is not working.Now i am explain cleanly…
In my webform i have 2 buttons when user click one button it will generate PDF file.when user click second button it will generate Word Document.I have written the code first generate word document and convert it into xml file using stream.Then i bind that xml file into PDF.After that i use the Pdf.save…If i write the code like this then work perfectly.Next i have written code for word document in the second button click event same as above upto before streams,after that i write doc.save… If i execute this the pdf generate an error…so could u tell me the mistakes…

Sorry, I am not sure I understand you correctly. Is this the same issue that discussed in this thread:

https://forum.aspose.com/t/128471?

If not, could you please elaborate your question (in particular, describe which error you are getting) and attach your sample code as well as the document templates?

Hi,
I am attaching the code here.First u execute the code with out removing the comments then it works perfectly.If u remove the comments then word execute perfectly but PDF genrates error.so find the attachment and give me the replay.

Please add Response.End() to the end of each method that sends the document to the browser. It will guarantee sending all buffered output to the client.