Welcome Guest Search | Active Topics | Sign In | Register

Too much time on MVCToPDF.RenderAsPDF() Options
Gesdocument
Posted: Thursday, September 26, 2013 11:33:17 AM
Rank: Member
Groups: Member

Joined: 5/23/2013
Posts: 24
Hi,
I've been used without problems the method:
EO.Pdf.HtmlToPdf.ConvertHtml(outXml, pathTempPdfFile) in my MVC2 project to render a pdf.
The time to render the pdf is acceptable with the EO.2012 library.
But now when when I use the EO.2013 library it takes too much time to render the pfd with the following method:
[Authorize]
[HttpPost]
[EO.Pdf.Mvc2.RenderAsPDF(AutoConvert = false)]
public ActionResult PDF(FormCollection collection)
{

EO.Pdf.HtmlToPdf.Options.PageSize = EO.Pdf.PdfPageSizes.A4;
EO.Pdf.HtmlToPdf.Options.OutputArea = new RectangleF(0.06f, 0.17f, 8.1f, 10.49f);
MVCToPDF.ResultFileName = "myFile";
//MVCToPDF.SendToClient = false;
MVCToPDF.RenderAsPDF();
return View("myView");

}
I call the PDF method from a form to render to pdf the view "myView" and I takes about 3 minutes to get de pdf.
Is there any way to use MVCToPDF.RenderAsPDF() and the timing to get the pdf is more acceptable?
Thanks!
eo_support
Posted: Thursday, September 26, 2013 12:01:31 PM
Rank: Administration
Groups: Administration

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

That's not normal. You may want to try to isolate the problem into a test app to see if you can identify what triggers the problem. You will also want to check this:

http://www.essentialobjects.com/doc/4/web/troubleshoot.aspx

Thanks!
Gesdocument
Posted: Thursday, October 3, 2013 3:40:52 AM
Rank: Member
Groups: Member

Joined: 5/23/2013
Posts: 24
Hi,
the problem is solved!
The problem was that in the aspx file I call an action of the controller to get an image to render it within the page. I've comment this line of code in the aspx file and now the timing is good.
Thanks!
eo_support
Posted: Thursday, October 3, 2013 9:35:00 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
I see. That makes senses because it can cause a deadlock in your web server. Thank you very much for the update!


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.