STA COM in ASP.net

December 4th, 2008

A frequent asked question when using HtmlCapture in ASP.net is how to set the apartment state of IIS’s worker thread to STA (HtmlCapture runs only in STA thread).

There are three  known methods to do that. But the simplest one is adding AspCompat=true to an <%@ Page > tag on your ASP.NET page, as shown in the following code.

<%@ Page AspCompat=”true” Language=”C#” %>

Posted in General | No Comments »

To draw right-aligned text, you could combine the SetHorizontalAlign() and DrawTextInBox() functions. Please refer to LitePDF documentation for detains.

Posted in LitePDF | No Comments »