Welcome Guest Search | Active Topics | Sign In | Register

PDF Failed to initialize conversion (1) Options
Michael
Posted: Thursday, May 1, 2014 3:33:08 PM
Rank: Newbie
Groups: Member

Joined: 3/25/2013
Posts: 8
Hello,
I am having a problem attempting to convert HTML to PDF from our Azure account.

I am receiving the error: Failed to initialize conversion

Below is my code:
PdfDocument doc = new PdfDocument();
HtmlToPdf.ConvertHtml("<html>" + HttpUtility.UrlDecode(PrePrint.Value) + "</html>", doc);
HttpResponse response = HttpContext.Current.Response;
response.Clear();
response.ClearHeaders();
response.ContentType = "application/pdf";
doc.Save(response.OutputStream);
Response.End();

Below is stack trace:

[k4: Failed to initialize conversion (1).]
EO.Pdf.Internal.lr.a(lr A_0, a A_1) +213
EO.Pdf.Internal.lr.a(hk A_0, Boolean A_1) +703
EO.Pdf.Internal.lr.a(hk A_0) +608

[HtmlToPdfException: Convertion failed. Failed to initialize conversion (1).]
EO.Pdf.Internal.lr.a(hk A_0) +743
EO.Pdf.HtmlToPdfSession..ctor(HtmlToPdfOptions A_0) +133
EO.Pdf.HtmlToPdf.ConvertHtml(String html, PdfDocument doc, HtmlToPdfOptions options) +53
NSiteTicketCommerce.CashUpReport.Print_Click(Object sender, EventArgs e) +115
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9753402
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +196
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724

This code runs fine on our local machine (iis Express). It only fails when we execute from our Azure website (.net 4.0). Any ideas? My control version is 4.0.60.2.

Thanks,

Michael Eubanks
eo_support
Posted: Thursday, May 1, 2014 3:41:16 PM
Rank: Administration
Groups: Administration

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

Please check whether you are deploying to Azure WebSite. EO.Pdf can not run on Azure WebSite. In order to use EO.Pdf with Windows Azure, you must deploy it to a Cloud Service or a Virtual Machine.

Thanks!
Michael
Posted: Thursday, May 1, 2014 4:13:44 PM
Rank: Newbie
Groups: Member

Joined: 3/25/2013
Posts: 8
We are deploying to an Azure WebSite. I had thought it worked at one time. Is there any remedy where we can use a managed web server?

Michael

eo_support
Posted: Thursday, May 1, 2014 4:28:25 PM
Rank: Administration
Groups: Administration

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

I am not sure if I understand your question correctly. You can use EO.Pdf with a managed web server, for example, you can use it with Windows Azure Cloud Service. The problem is not whether it's managed or not. The problem is Windows Azure WebSite. Windows Azure WebSite has a number of restrictions that makes it impossible for EO.Pdf to run. I believe products from other vendors have the same limitation as well.

Thanks!
Michael
Posted: Thursday, May 1, 2014 6:03:14 PM
Rank: Newbie
Groups: Member

Joined: 3/25/2013
Posts: 8
Ok, I see what you mean.. What exactly are those restrictions so I can address them with Microsoft or check other hosting services. This incompatibility has me worried.

Thanks,

Michael
eo_support
Posted: Thursday, May 1, 2014 9:35:15 PM
Rank: Administration
Groups: Administration

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

I don't think these are issues that Microsoft will address. They have existed from the beginning. One of these issues is traditional GDI support are very limited on Windows Azure WebSite. The official solution for avoiding such restrictions is to redeploy your site to an Azure Cloud Service or Azure virtual machine. It doesn't matter which service provider you use, as long as they run Windows Azure WebSite, you won't be able to use EO.Pdf.

Thanks!


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.