Welcome Guest Search | Active Topics | Sign In | Register

mvc to PDF dynamic parts are not always converted correctly Options
marta
Posted: Wednesday, January 23, 2019 9:01:57 AM
Rank: Newbie
Groups: Member

Joined: 1/10/2019
Posts: 2
Hi Support Team,

I start my adventure with eo and I have a problem when I want download page as pdf. I used a MVCToPDF.RenderAsPDF() function. Some of data which is displayed in page is set by javascript function. From time to time pdf is generated with wrong data and without pictures. I tried to use solution:

in javascript, after all operations are done:

if (window.eoapi && eoapi.isEOPdf())
eoapi.convert();

controler:

[System.Web.Mvc.HttpPost]
[System.Web.Mvc.ActionName("PrintPdf")]
[ValidateInput(false)]
[EO.Pdf.Mvc.RenderAsPDF(AutoConvert = false)]
public ActionResult DoAction([FromBody] string data, [FromUri] bool debug = false)
{
HtmlToPdf.Options.TriggerMode = HtmlToPdfTriggerMode.Manual;
MVCToPDF.RenderAsPDF()
return View("~/view", model);
}

but it does not work. I have problem with eoapi, eoapi is always undefined. I used version EO.Pdf.16.2.60.0. Can you help me with this issue? Maybe you could create an example how eoapi can be used together with MVCToPDF?
eo_support
Posted: Wednesday, January 23, 2019 12:46:19 PM
Rank: Administration
Groups: Administration

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

Please try the latest version and see if it works for you. eoapi does not exist in old versions.

Thanks!
marta
Posted: Thursday, January 24, 2019 8:18:43 AM
Rank: Newbie
Groups: Member

Joined: 1/10/2019
Posts: 2
Hi,

I try with the latest version and it works. Thank you for help.
eo_support
Posted: Friday, January 25, 2019 11:01:26 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,221
Great. Glad to hear that it works for you!


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.