Welcome Guest Search | Active Topics | Sign In | Register

Failed to initialize conversion Options
NeilJM
Posted: Thursday, September 1, 2011 5:03:45 AM
Rank: Newbie
Groups: Member

Joined: 9/1/2011
Posts: 4
Hi,

After researching a lot of html -> pdf solutions I decided that EO was good value and had great functionality. My page works locally and converts the html to a pdf properly, outputting it to the response. When I try to test it on the testing environment however I get the below error. I'm not sure what is causing this and haven't been able to reproduce it locally at all. I've included the DLLs in the bin directory of the application but I'm not really sure what else it could be. The html passed by the testing environment is exactly the same as what is being passed locally.

[HtmlToPdfException: Failed to initialize conversion.]
EO.Pdf.HtmlToPdfException.b(Exception A_0) +72
EO.Pdf.Internal.j2.h() +1238
EO.Pdf.HtmlToPdf.a(j2 A_0) +16
EO.Pdf.HtmlToPdf.ConvertHtml(String html, PdfDocument doc, HtmlToPdfOptions options) +46
EO.Pdf.HtmlToPdf.ConvertHtml(String html, Stream stream, HtmlToPdfOptions options) +50
EO.Pdf.HtmlToPdf.ConvertHtml(String html, Stream stream) +7
PrintPDF.Page_Load(Object sender, EventArgs e) in d:\WebProj\PrintPDF.aspx.cs:68
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

The calling code is:

using (MemoryStream ms = new MemoryStream())
{
EO.Pdf.HtmlToPdf.ConvertHtml(html, ms);

Response.BinaryWrite(ms.ToArray());

ms.Close();
}



If I can get it working on the testing environment then I'll be satisfied that it's the right product for the job and purchase.

Thanks in advance for your help :)
eo_support
Posted: Thursday, September 1, 2011 7:14:59 AM
Rank: Administration
Groups: Administration

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

Please check the version of your EO.Pdf.dll. There was a permission related bug that was fixed a long time ago. So if you do not have the latest build (3.0.63.2), please try to update to the latest build and see if it fixes the problem for you.

Thanks!
TroyDeck
Posted: Friday, October 7, 2011 8:02:54 AM
Rank: Newbie
Groups: Member

Joined: 10/7/2011
Posts: 4
I'm getting this error with version 3.0.75.2

Line that errors:

Dim Doc As New PdfDocument()
HtmlToPdf.ConvertHtml(HTMLSource, Doc) <-- this line errors


[Exception: Failed to initialize conversion.]
EO.Pdf.Internal.j7.c(Byte[] A_0, Int32 A_1) +1030
EO.Pdf.Internal.kc.a(String A_0, Boolean A_1, String A_2) +394
EO.Pdf.Internal.kc.h() +527

[HtmlToPdfException: Convertion failed. Failed to initialize conversion.]
EO.Pdf.Internal.kc.h() +2100
EO.Pdf.HtmlToPdf.a(kc A_0) +20
EO.Pdf.HtmlToPdf.ConvertHtml(String html, PdfDocument doc) +69
PDFHelper.GetPDFContent(String HTMLSource, String FileName) in D:\Inetpub\wwwroot\preview.geosolinc.com\vos12980002v120gusstg\vosnet\App_Code\objects\HelperClasses\PDFHelper\PDFHelper.vb:25
PDFHelper.CreatePDFFileIODTO(String fileName, String HTMLContent) in D:\Inetpub\wwwroot\preview.geosolinc.com\vos12980002v120gusstg\vosnet\App_Code\objects\HelperClasses\PDFHelper\PDFHelper.vb:82
Communications.CommunicationContentSaveOrSendManager.UI_TriggeredNotificationSaveOrSend(CommunicationsContentType inType, Int32 appId, String content, Boolean SendContentAsMessageCenterMessage, Boolean SendContentAsEmail, String fileNameAdditionalText, String lang) in D:\Inetpub\wwwroot\preview.geosolinc.com\vos12980002v120gusstg\vosnet\App_Code\objects\Communications\CommunicationContentSaveOrSendManager.vb:92
UnemploymentInsurance.Determinations.Ui_DeterminationManager.Add(Ui_DeterminationDTO objUi_IssueDeterminationDTO, String IPAddress, Boolean sendNonMonReconNotice) in D:\Inetpub\wwwroot\preview.geosolinc.com\vos12980002v120gusstg\vosnet\App_Code\objects\UnemploymentInsurance\Determinations\Ui_DeterminationManager.vb:145
UnemploymentInsurance.Determinations.Ui_DeterminationManager.Save(Ui_DeterminationDTO DeterminationDTO, String IPAddress, Int32 EditUser, Boolean sendNonMonReconNotice) in D:\Inetpub\wwwroot\preview.geosolinc.com\vos12980002v120gusstg\vosnet\App_Code\objects\UnemploymentInsurance\Determinations\Ui_DeterminationManager.vb:230
eo_support
Posted: Friday, October 7, 2011 8:16:10 AM
Rank: Administration
Groups: Administration

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

We are not aware of this problem in the new version. Please try to update to 3.0.76.2 (it will not fix the problem but it may give a better error message/stack trace) first. If the problem continues, check your event log to see if you can see any error message.

Thanks
TroyDeck
Posted: Friday, October 7, 2011 10:18:46 AM
Rank: Newbie
Groups: Member

Joined: 10/7/2011
Posts: 4
Thanks for your quick response. I've updated to eo.pdf.dll version 3.0.76.2 and eo.web.dll version 9.0.28.2. My error message changed slightly, see below.

We are running the evaluation copy. The code works on my local machine, fails on our preview server. Local system is Windows 7 64 bit, preview server is Windows 2003 64 bit. Both are running IIS 6.0.

Code:
Dim Doc As New PdfDocument()
HtmlToPdf.ConvertHtml(HTMLSource, Doc) <-- this is the error line

Exception:
[Exception: Failed to initialize conversion.]
EO.Pdf.Internal.j6.c(Byte[] A_0, Int32 A_1) +1030
EO.Pdf.Internal.kb.a(String A_0, Boolean A_1, String A_2) +399
EO.Pdf.Internal.kb.a() +514

[HtmlToPdfException: Convertion failed. Failed to initialize conversion.]
EO.Pdf.Internal.kb.a() +2084
EO.Pdf.HtmlToPdf.a(kb A_0) +28
EO.Pdf.HtmlToPdf.ConvertHtml(String html, PdfDocument doc) +69
PDFHelper.GetPDFContent2(String HTMLSource, String FileName) in D:\Inetpub\wwwroot\preview.geosolinc.com\vos12980002v120gusstg\vosnet\App_Code\objects\HelperClasses\PDFHelper\PDFHelper.vb:78
_VOSTestPage.SetupFileIODTO() in D:\Inetpub\wwwroot\preview.geosolinc.com\vos12980002v120gusstg\vosnet\utilitypages\VOSTestPage.aspx.vb:80
_VOSTestPage.FileIODTOTests() in D:\Inetpub\wwwroot\preview.geosolinc.com\vos12980002v120gusstg\vosnet\utilitypages\VOSTestPage.aspx.vb:60
_VOSTestPage.Page_Load(Object sender, EventArgs e) in D:\Inetpub\wwwroot\preview.geosolinc.com\vos12980002v120gusstg\vosnet\utilitypages\VOSTestPage.aspx.vb:27
System.Web.UI.Control.OnLoad(EventArgs e) +132
System.Web.UI.Control.LoadRecursive() +66
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428
eo_support
Posted: Friday, October 7, 2011 10:45:18 AM
Rank: Administration
Groups: Administration

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

Thanks for the information. Do you see anything in your event log yet?

Usually the difference between a server environment and a dev environment is permission. However our code explicitly checks permissions and should give you a different error message if that check fails. So either we have missed some cases on permission check, or this is a completely new issue that we are not aware of. We will try to setup an environment the same as yours and see if we can find anything. In the mean time, you may want to try the same deployment on a Windows 2008/Windows 7 environment and see if it works for you.

Thanks!
TroyDeck
Posted: Friday, October 7, 2011 12:13:31 PM
Rank: Newbie
Groups: Member

Joined: 10/7/2011
Posts: 4
Event Source: ASP.NET 2.0.50727.0
Event Category: Web Event
Event ID: 1309
Date: 10/7/2011
Time: 8:00:39 AM
User: N/A
Computer: WEBTVOS0110
Description:
Event code: 3005 Event message: An unhandled exception has occurred.
Event time: 10/7/2011 8:00:39 AM
Event time (UTC): 10/7/2011 12:00:39 PM
Event ID: 95f15e893cbe4b69a04092121af1f270
Event sequence: 727
Event occurrence: 3
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/43351037/Root/vos12980002v120gusstg/vosnet-27-129624613823776215
Trust level: Full Application Virtual Path: /vos12980002v120gusstg/vosnet
Application Path: D:\Inetpub\wwwroot\preview.geosolinc.com\vos12980002v120gusstg\vosnet\
Machine name: WEBTVOS0110
Process information:
Process ID: 3380
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE
Exception information:
Exception type: HtmlToPdfException
Exception message: Convertion failed. Failed to initialize conversion.
Request information:
Request URL: (Link: http://preview.geosolinc.com/vos12980002v120gusstg/vosnet/UI/Issues/IssueEdit.aspx?mode=createresolve&from=uifolder&appid=153)http://preview.geosolinc.com/vos12980002v120gusstg/vosnet/UI/Issues/IssueEdit.aspx?mode=createresolve&from=uifolder&appid=153
Request path: /vos12980002v120gusstg/vosnet/UI/Issues/IssueEdit.aspx
User host address: 10.2.1.236
User: Is authenticated: False
Authentication Type:
Thread account name: NT AUTHORITY\NETWORK SERVICE
Thread information:
Thread ID: 7
Thread account name: NT AUTHORITY\NETWORK SERVICE
Is impersonating: False
Stack trace:
at EO.Pdf.Internal.kc.h()
at EO.Pdf.HtmlToPdf.a(kc A_0)
at EO.Pdf.HtmlToPdf.ConvertHtml(String html, PdfDocument doc)
at PDFHelper.GetPDFContent(String HTMLSource, String FileName) in D:\Inetpub\wwwroot\preview.geosolinc.com\vos12980002v120gusstg\vosnet\App_Code\objects\HelperClasses\PDFHelper\PDFHelper.vb:line 25
at PDFHelper.CreatePDFFileIODTO(String fileName, String HTMLContent) in D:\Inetpub\wwwroot\preview.geosolinc.com\vos12980002v120gusstg\vosnet\App_Code\objects\HelperClasses\PDFHelper\PDFHelper.vb:line 82
at Communications.CommunicationContentSaveOrSendManager.UI_TriggeredNotificationSaveOrSend(CommunicationsContentType inType, Int32 appId, String content, Boolean SendContentAsMessageCenterMessage, Boolean SendContentAsEmail, String fileNameAdditionalText, String lang) in D:\Inetpub\wwwroot\preview.geosolinc.com\vos12980002v120gusstg\vosnet\App_Code\objects\Communications\CommunicationContentSaveOrSendManager.vb:line 92
at UnemploymentInsurance.Determinations.Ui_DeterminationManager.Add(Ui_DeterminationDTO objUi_IssueDeterminationDTO, String IPAddress, Boolean sendNonMonReconNotice) in D:\Inetpub\wwwroot\preview.geosolinc.com\vos12980002v120gusstg\vosnet\App_Code\objects\UnemploymentInsurance\Determinations\Ui_DeterminationManager.vb:line 145
at UnemploymentInsurance.Determinations.Ui_DeterminationManager.Save(Ui_DeterminationDTO DeterminationDTO, String IPAddress, Int32 EditUser, Boolean sendNonMonReconNotice) in D:\Inetpub\wwwroot\preview.geosolinc.com\vos12980002v120gusstg\vosnet\App_Code\objects\UnemploymentInsurance\Determinations\Ui_DeterminationManager.vb:line 230
at UI_ucIssueEdit.SaveIssue() in D:\Inetpub\wwwroot\preview.geosolinc.com\vos12980002v120gusstg\vosnet\ui\issues\usercontrols\IssueEdit.ascx.vb:line 928
at _UI_IssueEdit.btnSave_Click(Object sender, EventArgs e) in D:\Inetpub\wwwroot\preview.geosolinc.com\vos12980002v120gusstg\vosnet\UI\Issues\IssueEdit.aspx.vb:line 323
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Custom event details:
eo_support
Posted: Friday, October 7, 2011 4:14:02 PM
Rank: Administration
Groups: Administration

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

This is just to let you that we have reproduced the problem in our environment. We are still researching the problem and will post again as soon as we have a solution.

Thanks!
eo_support
Posted: Friday, October 7, 2011 7:07:19 PM
Rank: Administration
Groups: Administration

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

We have posted a new build that may fix the problem for you. Please see your private message for the download location.

Thanks!
TroyDeck
Posted: Saturday, October 8, 2011 12:43:10 PM
Rank: Newbie
Groups: Member

Joined: 10/7/2011
Posts: 4
That fix works in our environment. Thanks for your quick response on this issue.
eo_support
Posted: Saturday, October 8, 2011 12:58:08 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Great. Thank you very much for the update!
anyei
Posted: Thursday, October 27, 2011 12:42:57 PM
Rank: Member
Groups: Member

Joined: 10/27/2011
Posts: 10
Hi all, i think its a little bad that you didn't post the hot fix on this post. I'm having the same issue (works in dev but not in prod with iis7). I would like to know where is the hot fix located so i can reach out that. Thanks in advance.

Note: i'm running the evaluation copy as well..
eo_support
Posted: Thursday, October 27, 2011 12:48:22 PM
Rank: Administration
Groups: Administration

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

I believe the version on our download page already has the fix. Please let us know if that fixes the problem for you or not.

Thanks
anyei
Posted: Thursday, October 27, 2011 12:58:30 PM
Rank: Member
Groups: Member

Joined: 10/27/2011
Posts: 10
Yikes!!, weird thou, i just downloaded that version today early morning. :S
anyei
Posted: Thursday, October 27, 2011 12:59:23 PM
Rank: Member
Groups: Member

Joined: 10/27/2011
Posts: 10
I'll re-download that now and i'll let you know.
eo_support
Posted: Thursday, October 27, 2011 1:00:52 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
That would be something else unless you have downloaded an older build a while before. We have not updated our download page this week. So there is no reason that you downloaded it this morning it didn't work but download it just now and works.
anyei
Posted: Thursday, October 27, 2011 1:07:01 PM
Rank: Member
Groups: Member

Joined: 10/27/2011
Posts: 10
version 3.0.79.2 (EO.Pdf.dll), its that the right one?
eo_support
Posted: Thursday, October 27, 2011 1:08:07 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Yes. That's the correct one.

Thanks
anyei
Posted: Thursday, October 27, 2011 1:10:26 PM
Rank: Member
Groups: Member

Joined: 10/27/2011
Posts: 10
MMM, i need some help here. What should i do for make this work...???

(i just don't have nothing else in mind.)
eo_support
Posted: Thursday, October 27, 2011 1:15:31 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
We don't know why it's failing on your machine yet. Is it possible for you to let us to take a look of your machine? We use Citrix GotoMeeting to access remote machines. You do not need to do any special configuration. You just need to "join a meeting" in order to give us access.

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.