If you are using ajax then update panel will stop page refresh at the time if you are using control side event to print any document. Then it needs to page refresh other wise it will not work.
For this you have to use AsyncPostBackTrigger
The <asp:asyncpostbacktrigger xmlns:asp="#unknown"> element is particularly useful in that it can target any event from a Control that exists as a child of any UpdatePanel control in the unit of encapsulation, not just the UpdatePanel under which this trigger is a child. Thus, any control can be made to trigger a partial page update.
<triggers>
<asp:asyncpostbacktrigger controlid="Button1">
EventName="Click" />
</asp:asyncpostbacktrigger></triggers>
Get more details from following link
understanding-asp-net-ajax-updatepanel-triggers[
^]