|
Rank: Newbie Groups: Member
Joined: 8/23/2012 Posts: 4
|
I am evaluating this library for use in a production environment. I am able to render a simple webpage using TriggerMode auto, but can't seem to get it working with Dual or Manual. When the code gets to ConvertUrl it just hangs and the request times out. I've included my code sample below:
Code: C#
var tempFile = Path.GetTempFileName();
EO.Pdf.HtmlToPdf.Options.OutputArea = new RectangleF(0.5f, 0.5f, 7.5f, 10f);
HtmlToPdf.Options.JpegQualityLevel = 100;
HtmlToPdf.Options.PreserveHighResImages = true;
HtmlToPdf.Options.NoLink = true;
HtmlToPdf.Options.TriggerMode = HtmlToPdfTriggerMode.Manual;
HtmlToPdf.ConvertUrl("http://jsfiddle.net/jgdreyes/jxyqj/show", tempFile);
return File(tempFile, "application/pdf", Server.UrlEncode("test_report.pdf"));
Code: JavaScript
$(function () {
if (typeof(eopdf) == "object") {
$("#eopdf-message").text("GOT CONVERT MESSAGE");
eopdf.convert();
} else {
$("#eopdf-message").text("mo message");
}
});
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
Where did you call the manual trigger?
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 8/23/2012 Posts: 4
|
Hmm. I thought I was calling it in the javascript check for eopdf type
Code: JavaScript
$(function () {
if (typeof(eopdf) == "object") {
$("#eopdf-message").text("GOT CONVERT MESSAGE");
// call to manual trigger here
eopdf.convert();
} else {
$("#eopdf-message").text("mo message");
}
});
You can see the JavaScript code here: http://jsfiddle.net/jgdreyes/jxyqjThanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
You are right. Sorry that we missed that! This looks like a bug. We are looking into this and will get back to you as soon as possible.
|
|
Rank: Newbie Groups: Member
Joined: 8/23/2012 Posts: 4
|
Okay thanks! I'm looking forward to the fix.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
We have posted a new build that should fix the problem for you. Please see your private message for the download location.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 8/23/2012 Posts: 4
|
Thanks! I downloaded it and the simple example above now works.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Great. Thank you very much for confirming the fix. Please feel free to let us know if there is anything else.
|
|