|
Rank: Newbie Groups: Member
Joined: 8/1/2014 Posts: 3
|
Is it possible to use the free EO Progress Bar along with ASPXToPDF Render As PDF (RenderAsPDF)? If not the EO Progress Bar, can someone suggest animation in ASP.NET? I'm just using a standard button onclick method to call the following:
protected void btn_saveAsPdf_Click(object sender, EventArgs e) { ASPXToPDF1.RenderAsPDF("Test.pdf"); }
I just want the animation (or progress bar) to start on click and stop when the PDF is ready.
Thanks.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
Thanks for posting in the forum. It is not possible to display a ProgressBar with ASPXToPDF because the HTML to PDF converter does not provide progress information. It is possible to use an animation but it would require quite some programming. For example, you can call the converter with an iframe and then use another frame to run some JavaScript code to query the server to check if the conversion is done (you will need to use some other mechanism to communicate between the conversion request and the querying requests). You would need to handle the ASPXToPDF control's AfterRender event to notify your code that the conversion is done on the server side.
Thanks
|
|
Rank: Newbie Groups: Member
Joined: 8/1/2014 Posts: 3
|
Thank you for the suggestions.
I am unable to understand this line: "You would need to handle the ASPXToPDF control's AfterRender event to notify your code that the conversion is done on the server side". I cannot seem to find a means to do this. All calls from AfterRender do not seem to pass through to the page. I have tried :
HttpContext.Current.Response.Write Response.Write ClientScript.RegisterStartupScript System.Web.UI.ScriptManager.RegisterStartupScript
Can you explain to me the notification format that would be used in AfterRender?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
What we suggested is just a general programming concept, it does not have anything particular to do with ASPXToPDF or ASP.NET. Basically you have two two piece of code, A and B, where A needs to notify B that something has happened. One way to do this is for B to sit there running a infinite loop that keeps checking a flag, and then when A is called, A sets that flag --- obviously this is not a very efficient approach but this is just to give you an idea of what we meant.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 8/1/2014 Posts: 3
|
Thank you for the quick reply.
I did understand your programming concept from your original reply. I thought you may be able to shed some light on how to set a flag from the AfterRender event callback. The PDF is generated and the AfterRender event is called. As I mentioned in my prior post I tried many ways to send notifications to notify the page and all of them are coming up empty. I can appreciate that you are not in the business of providing C# coding help. I just wondered if there was an approach you knew of to notify the page from AfterRender that it was in fact complete? Again, I am not asking for code but just the approach. Thanks in advance for anything you can offer.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Thanks for understanding. You are very correct that we are not in the business of providing C# coding help. So we are not in a position to provide further asistance on such general programming matter. As such you have to seek help through other channels. Sorry about it!
|
|