Welcome Guest Search | Active Topics | Sign In | Register

Error while converting html to PDF. We are calling HtmlToPdf.ConvertHtml function Options
CLH
Posted: Wednesday, June 11, 2014 2:28:01 PM
Rank: Newbie
Groups: Member

Joined: 6/25/2013
Posts: 2
We are getting below error while converting html to PDF. We are calling HtmlToPdf.ConvertHtml function. Same code working fine in development environment, but getting below error TEST environment. Please suggest us on this one.

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> EO.Pdf.HtmlToPdfException: Convertion failed. Unable to create worker thread.Error creating window handle. ---> System.Exception: Unable to create worker thread.Error creating window handle.
at EO.Pdf.Internal.ls..ctor()
at EO.Pdf.Internal.ls.a(ls A_0, List`1 A_1, Boolean A_2)
at EO.Pdf.Internal.ls.a(hk A_0, Boolean A_1)
at EO.Pdf.Internal.ls.a(hk A_0)
--- End of inner exception stack trace ---
at EO.Pdf.Internal.ls.a(hk A_0)
at EO.Pdf.HtmlToPdfSession..ctor(HtmlToPdfOptions A_0)
at EO.Pdf.HtmlToPdf.ConvertHtml(String html, PdfDocument doc, HtmlToPdfOptions options)
at EO.Pdf.HtmlToPdf.ConvertHtml(String html, String pdfFileName, HtmlToPdfOptions options)
at EO.Pdf.HtmlToPdf.ConvertHtml(String html, String pdfFileName)
at ScriptTask_29c46a72274d4dfe84b2435517313d03.vbproj.ScriptMain.generatePDF2()
at ScriptTask_29c46a72274d4dfe84b2435517313d03.vbproj.ScriptMain.Main()
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript()
eo_support
Posted: Wednesday, June 11, 2014 8:10:52 PM
Rank: Administration
Groups: Administration

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

This usually indicates a resource leak. But can also happen if you stress the system particularly on purpose and then run the converter. This page gives a good explanation of when this can happen:

http://weblogs.asp.net/fmarguerie/cannot-create-window-handle-desktop-heap

To check if you have any handle leak, go to Task Manager and enable GDI Objects, Handles, Threads and USER objects columns and see if you see unusual consistent growth in any of those before this happens. If you do notice a handle leak and you believe it is related to us, please try to isolate the problem into a test project and then send the test project to us. We will investigate further as soon as we receive it.

Thanks!
CLH
Posted: Monday, August 11, 2014 10:26:45 AM
Rank: Newbie
Groups: Member

Joined: 6/25/2013
Posts: 2
Hi,

Sorry for delay on updating status. Still we are getting same error. We tried in our test environment and observed Task Manager. We observed that while running this process in TEST it consuming more resoluces on server. Its keep on increase respurce consumption and after certain limit reached it throws above mentioned error. I can share code we are running.

Thanks.
eo_support
Posted: Monday, August 11, 2014 10:30:24 AM
Rank: Administration
Groups: Administration

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

We will need you to isolate the problem into a test project so that we can run it here to see the problem. Usually as soon as we can see the problem here, we will be able to find out the root cause. Please see here for more information on how to submit a test page:

http://www.essentialobjects.com/forum/test_project.aspx

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.