Welcome Guest Search | Active Topics | Sign In | Register

asp to pdf Crashes Options
PDG
Posted: Saturday, February 18, 2012 5:02:29 PM
Rank: Advanced Member
Groups: Member

Joined: 12/19/2010
Posts: 47
I added the functionality to export a page to pdf. The functionality was added at the master page level. It was inside an ajax update panel. I setup a trigger to do a normal postback and when I postback the control crashes hard. I have both eo.web and eo.pdf installed.

I think I am doing everything right, any help would be appreciated.

[NullReferenceException: Object reference not set to an instance of an object.]
EO.Web.Internal.db.a(String A_0) +35
EO.Web.ASPXToPDF.a(Object A_0) +633
EO.Web.Internal.mb.a(HttpResponse A_0, String A_1) +82
EO.Web.Internal.is.a(HtmlTextWriter A_0, Control A_1) +221
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +109
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
System.Web.UI.Page.Render(HtmlTextWriter writer) +29
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3060

<asp:UpdatePanel ID="RightContentUpdatePanel" runat="server" updatemode="Conditional">
<ContentTemplate>
<asp:Panel ID="RightContentPanel" runat="server">
<td class="right_client" style="vertical-align:top;">
<div class="rightboxstyle">
<div class="boxed">
<h2 class="title"><asp:Literal ID="Literal5" runat="server" Text="<%$ Resources: MASTER_SIS %>"></asp:Literal></h2>
<div class="content">
<asp:Panel ID="SISPanel" runat="server"></asp:Panel>
</div>
</div>
</div>
<div class="rightboxstyle">
<div class="boxed">
<h2 class="title"><asp:Literal ID="Literal15" runat="server" Text="Export Page to PDF"></asp:Literal></h2>
<p>Click the following button to export this page to a PDF file for viewing, sharing and printing.
</p>
<div class="content">
<eo:ASPXToPDF runat="server" ID="ASPXToPDF1"></eo:ASPXToPDF>
<asp:Button runat="server" ID="ExportPDF_Button" Text="Export to PDF" onclick="ExportPDF_Click" />
</div>
</div>
</div>
<asp:ContentPlaceHolder ID="RightOfClient" runat="server">
</asp:ContentPlaceHolder>
</td>
</asp:Panel>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="ExportPDF_Button" />
</Triggers>
</asp:UpdatePanel>


eo_support
Posted: Saturday, February 18, 2012 6:32:21 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

You can not have ASPXToPDF inside AJAX Panel. You can use AJAX to update other portion of the page. But you can not use AJAX to trigger the PDF export.

Thanks
PDG
Posted: Sunday, February 19, 2012 12:42:19 AM
Rank: Advanced Member
Groups: Member

Joined: 12/19/2010
Posts: 47
Hmmm ... Ok I moved it out of any update panel and still have the exact same results:

<!--------------------------- Right Content Area --------------------------->
<asp:Panel ID="RightContentPanel" runat="server">
<table>
<tr>
<td class="right_client" style="vertical-align:top;">
<div class="rightboxstyle">
<div class="boxed">
<h2 class="title"><asp:Literal ID="Literal5" runat="server" Text="<%$ Resources: MASTER_SIS %>"></asp:Literal></h2>
<div class="content">
<asp:Panel ID="SISPanel" runat="server"></asp:Panel>
</div>
</div>
</div>
<div class="rightboxstyle">
<div class="boxed">
<h2 class="title"><asp:Literal ID="Literal15" runat="server" Text="Export Page to PDF"></asp:Literal></h2>
<p>Click the following button to export this page to a PDF file for viewing, sharing and printing.
</p>
<div class="content">
<eo:ASPXToPDF runat="server" ID="ASPXToPDF1"></eo:ASPXToPDF>
<asp:Button runat="server" ID="ExportPDF_Button" Text="Export to PDF" onclick="ExportPDF_Click" />
</div>
</div>
</div>
<asp:ContentPlaceHolder ID="RightOfClient" runat="server">
</asp:ContentPlaceHolder>
</td>
</tr></table>
</asp:Panel>

[NullReferenceException: Object reference not set to an instance of an object.]
EO.Web.Internal.db.a(String A_0) +35
EO.Web.ASPXToPDF.a(Object A_0) +633
EO.Web.Internal.mb.a(HttpResponse A_0, String A_1) +82
EO.Web.Internal.is.a(HtmlTextWriter A_0, Control A_1) +221
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +109
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
System.Web.UI.Page.Render(HtmlTextWriter writer) +29
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3060
eo_support
Posted: Sunday, February 19, 2012 8:03:47 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

In that case please try to update BOTH EO.Web and EO.Pdf to the latest build. Make sure you update BOTH of them and see if it fixes the problem. It is possible for you to run into this error if you have a newer version of EO.Web but an older version of EO.Pdf.

If the problem still occurs, please try to isolate the problem into a small test project and send the test project to us. We will PM you as to where to send.

Thanks!
PDG
Posted: Sunday, February 19, 2012 10:48:00 AM
Rank: Advanced Member
Groups: Member

Joined: 12/19/2010
Posts: 47
Thank you for the reply, I believe this may be the case as I updated eo.web not long ago, but not eo.pdf ...


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.