Welcome Guest Search | Active Topics | Sign In | Register

This content has already been rendered. Options
lpac
Posted: Monday, May 23, 2011 7:56:50 PM
Rank: Newbie
Groups: Member

Joined: 5/23/2011
Posts: 2
Dear Support,

I'm testing your EO.PDF in visual Basic 2010.
I have stumbled across the following problem and hope that you could assist me.

I have a simple application, basically a text box to capture user information and a button to generate the PDF document.

After inserting text into the textbox and clicking on my application button, the application generates the PDF as to be expected, However if I click on the application button a second time the process fails at the render.render(root) Stating that "This content has already been rendered".

How can I overcome this?

Your input will be appreciated
eo_support
Posted: Monday, May 23, 2011 8:37:10 PM
Rank: Administration
Groups: Administration

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

You must create a new Acm object every time. For example, the following code will cause the error:

Code: C#
//Create an AcmText object
AcmText text = new AcmText("something");

//Render the text, this is OK
render.Render(text);

//Render the text again, this will cause the "content is already 
//rendered" error because you have already called Render(text) once
render.Render(text);

The following code will work fine:

Code: C#
//Create an AcmText object
AcmText text = new AcmText("something");

//Render the text, this is OK
render.Render(text);

//Create a new AcmText object and then render that text
//object again. This is OK because text is a new AcmText
//object here
text = new AcmText("something");
render.Render(text);


Hope this helps.

Thanks
lpac
Posted: Tuesday, May 24, 2011 6:21:25 AM
Rank: Newbie
Groups: Member

Joined: 5/23/2011
Posts: 2
Dear EO_support,

Thank you for your responce.

The issue is resolved :)
eo_support
Posted: Tuesday, May 24, 2011 9:44:36 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Great. Please feel free to let us know if you have any more questions.

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.