Welcome Guest! To enable all features, please Login or Register.



Last Go to last post Unread Go to first unread post
#1 Posted : Wednesday, February 27, 2013 11:53:52 AM(UTC)


Groups: Registered, Tech Support
Posts: 207

Was thanked: 3 time(s) in 3 post(s)

This issue is due to the HTML filter not being thread safe.  Rather the Microsoft object we use internally is not thread safe.
By default a Console Application's main function has the attribute [MTAThread] although it does not explicitly appear in the code.

To be able to load an HTML file from within a Console Application you must add the attribute [STAThread] to the function using the feature.

I have attached a sample Console Application that loads an HTML page from disk and saves it out as multi-paged TIFF.

Also, by default, the Microsoft object is using an HTML parser equivalent to I.E. 7.  If you wish to support later versions of HTML (like HTML5) you will have to alter the registry setting for the object by adding your application's name and the version number of I.E. you wish to use.  More information can be found here:


The attached project is in Visual Studio 2008 using LEADTOOLS Version 17.5

File Attachment(s):
NET-V175-Load_HTML_Console_Application.zip (36kb) downloaded 137 time(s).
Travis Montgomery
Senior Sales Engineer

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Thursday, October 5, 2017 8:01:01 AM(UTC)
Anthony Northrup

Groups: Registered, Tech Support, Administrators
Posts: 199

Was thanked: 28 time(s) in 28 post(s)

Updated to LEADTOOLS v19 with Visual Studio 2017. Also changed project to automatically select dll's for running in 32-bit and 64-bit.
Extract to "C:\LEADTOOLS 19\Examples\DotNet\CS\" to use the example.

There is an included HTML file for testing ("CS_LoadHTMLConsole.htm"), copy to the LEADTOOLS Images folder ("C:\Users\Public\Documents\LEADTOOLS Images\") before running.
File Attachment(s):
CS_LoadHTMLConsole.zip (40kb) downloaded 113 time(s).
Anthony Northrup
Developer Support Engineer
LEAD Technologies, Inc.

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.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.076 seconds.