|
Rank: Newbie Groups: Member
Joined: 10/7/2015 Posts: 4
|
Hi there, We are using EO pdf for our .net MVC4.5 project. We have a session variable Session["ScriptTimeout"] set with the current DateTime when the view is refreshed. The sole purpose of this is to change the version number to the reference of our JavaScript. (similar approach can be seen here) When the user refresh, we check if it has passed 5 minutes from the time in the session variable. If 5 minutes passed, we set Session["ScriptTimeout"] = DateTime.UtcNow.AddMinutes(5) otherwise, we do nothing We do not check the session variable when the user post to the print controller method. Here's the problem:As long as we assigned some value to the session variable, it took 2 minutes to render the pdf file. Quote:Session["ScriptTimeout"] = DateTime.UtcNow.AddMinutes(5); When no session variable is set, everything goes under 10 seconds. Please advice.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
Do you use HtmlToPdf.ConvertHtml/ConvertUrl directly or MVC to PDF?
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 10/7/2015 Posts: 4
|
We are not using HtmlToPdf.ConvertHtml/ConvertUrl. Our view is rendered mainly using AngularJS. In both cases, the pdf file are rendered correctly.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
That's not what I am asking. You said you use EO.Pdf. My question is how do you use EO.Pdf? Do you use the MVCToPDF feature, or do you call HtmlToPdf.ConvertHtml/ConvertUrl directly from your code? What code do you use to call our library?
Thanks
|
|
Rank: Newbie Groups: Member
Joined: 10/7/2015 Posts: 4
|
We're using the MVCToPDF feature.
At the controller, we decorated the post method this way:
[RenderAsPDF] [HttpPost] public ActionResult PrintPdf(SomeDto printData){ // some EO pdf settings .... return View("PdfView", printData); }
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi, Can you try to isolate the problem into a test project and send the test project to us? You can find more details here: http://www.essentialobjects.com/forum/test_project.aspxThanks!
|
|
Rank: Newbie Groups: Member
Joined: 10/7/2015 Posts: 4
|
Hi there,
I've spent too much time trouble shoot this issue. Instead of session, I used cookie to get around it. I suspect that it could be related to the security verification.
Thanks for your time.
Regards, Loki
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
No problem. Please feel free to let us know if there is anything else.
Thanks
|
|