Welcome Guest Search | Active Topics | Sign In | Register

Can not call RenderAsPDF before OnInit is called Options
mcado
Posted: Wednesday, August 24, 2011 11:24:53 AM
Rank: Newbie
Groups: Member

Joined: 8/24/2011
Posts: 4
Hi EO

I dont understand this error.

i have : <%@ Register assembly="EO.Web" namespace="EO.Web" tagprefix="eo" %>
and <eo:ASPXToPDF ID="ASPXToPDF1" runat="server">
</eo:ASPXToPDF> on a aspx page.

and Dim fileName As String = String.Format("Grand-Livre-{0:yyyy-MM-dd}.pdf", Now)
ASPXToPDF1.RenderAsPDF(fileName)

how to pease?
Regards

Marc
eo_support
Posted: Wednesday, August 24, 2011 1:56:43 PM
Rank: Administration
Groups: Administration

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

You are calling it too early. Try to call it inside an event handler (for example, a Button's Click event handler), or inside your Page_Load event.

Thanks!
mcado
Posted: Thursday, August 25, 2011 2:42:09 AM
Rank: Newbie
Groups: Member

Joined: 8/24/2011
Posts: 4

yes l call aspxtopdf in page_load event of an aspx page

and this is the last vb command...

regards

mc

eo_support
Posted: Thursday, August 25, 2011 1:37:44 PM
Rank: Administration
Groups: Administration

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

That should work fine. Can you create a test project to demonstrate the problem and send it to us?

Thanks


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.