Monthly Archives: June 2006

Convert local html file to image

Some people want to convert html file at local disk to image. This can be done with html snapshot easily

Suppose your local html file is c:1.htm, you can call html snapshot like this to convert it into jpg file:

snap.SnapUrl(“file://c:1.htm”, “c:1.jpg”)

If you have a html string, you can do it in two ways.

1. save your html string to a local html file like c:1.htm. Then call SnapUrl in your program like above

2. you can call SnapHtmlString to achieve this.

 

 

 

 

Customer comments on html snapshot

Customer satifaction is one of our goal and motivation to start software business. We always work hard to ensure our customers are satisfied with our products or services. And we would like to collect customer’s feedback and comments on our products as well. :)

Here are some of the comments we got:

The HTML snapshot is a great tool. It saved me many hours of development time and allowed me to concentrate on my application.

Thanks for your support and hand-holding.

–Mr. Wigdor

Write a folder in ASP.Net

When using our components like  pdf split and merge in your ASP.Net application, you need to first set the working folder access to ensure the folder can be written in ASP.Net

 1. Using Windows Explorer, navigate to the working Folder (for example C:Inetpubwwwroot).

2. Right-click on the folder and choose Properties.

3. Select the Security tab. If you do not see the Security tab with Windows XP, you must disable “Simple File Sharing.” From the Windows Explorer menu choose Tools, Folder Options, View tab, and uncheck the Use simple file sharing (Recommended) option. This will enable the Security tab on file and folder property dialogs.

4. Look in the Group or user names list for aspnet_wp account (machine_nameASPNET) where machine_name is the name of your computer. If it is not present, click the Add… button and type ASPNET in the box and click the OK button.
Select the aspnet_wp account (machine_nameASPNET) user. Make sure the Allow check boxes are checked for the Modify and Write permissions. Click the OK button.
 

PDF stamper: stamp watermark on given pages

We have updated the PDF Stamper component with a new method SetPageMask.

You can use this method to specify which pages you want to stamp watermark or text onto.

The string format of the mask is composed of a series of 0 and 1. The position of 1 and 0 corresponds to the pdf page number. 0 will denote that the correspondent page will not be stamped on. 1 is on the contrary. So:

“1000″   :   the 2,3,4 page of the pdf file will not be stamped on.

“010101″:  the even page of the pdf file will be stamped on

 

 

FAQ: run regsvr32.exe failed in Vista.

When I first try to register our ActiveX component such as htmlsnapshot, an error is shown,”DllRegisterServer in xxxx.dll failed.Return code was:0×80070005″.

0×80070005 means “Access Denied”, but I’ve been an administrator. I think this is related to the new security model in vista.

After doing some research, here is the correcy way to do so:

 To register activex control to local machine(not only current user) successfully, developers must right click on “Command Prompt” in Accessories and click “Run as Administrator”,  then run “regsvr32 foo.dll” in the command window.
It’s due to Vista’s new feature, not a activex’s bug