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

 

Using Active Audio Record in flash

Flash movie has support for Action Script which is a kind of scripting language.

But it doesn’t provide built-in audio record functionality for flash developers.

Some developers uses Zinc which extends Action Script to include more powerful functions. One of them is the support for ActiveX control. (Note, not General ActiveX Automation). This makes it possible to use Active Audio Record in Flash.

Since Active Audio Record is an ActiveX automation aerver, We have made an ActiveX Control Wrapper around it so that it can be used in Zinc. And we also provide a demo flash movie (DemoZinc) and its source FLA file.

Please download and try audio record in flash now. :)
If you want to redistribute a flash movie with audio record component now, the files needs to be redistributed are AudioCtrlWrapper.ocx, AudioCtl.dll and lame_enc.dll. And the first two needs to registered with regsvr32.exe like tools.

 

Licensing models

We have been asked about licensing models by some customers. Here are some clarifications.

For end-user products:

Single user license: the license is applicable when only one user will use it.
Site license: the license is applicable when the product will be used by a group of people in a company.
 

For development components:

Single developer license: the license is applicable when only 1 developer will use the component or the component can be deployed on one server as service. 
Development team license: the license is applicable when a development team will use the component or the component can be deployed on five servers as service
Enterprise license: the license is applicable for using the component by an enterprise on unlimited servers as service or applications
Source license
: the license is applicable for using the source code of the components in unlimited servers as service or applications

If you are developing a desktop application (not web service), all of the above licenses allows you to redistribute the component freely with your application.


 

Convert EMF or WMF to Image

Html snapshot supports converting html to vector image format such as EMF  and WMF.

Now it also supports the function to convert EMF or WMF into raster image format like JPG, JPEG, BMP, TIFF, PNG or GIF.

Instructions:

1. Download the latest version of html snapshot and install

 http://www.guangmingsoft.net/htmlsnapshot/HtmlSnapSetup.exe

2. Try the VBScript demo html2wmf.vbs

‘demo how to generate vector format WMF file

Set WshShell = WScript.CreateObject(“WScript.Shell”)
‘Declare object
Dim snap
Set snap = CreateObject(“HTMLSNAP2.HtmlSnap.1″)
snap.SetTimeOut CLng(200000)

snap.SnapUrl “http://www.macromedia.com/“, “2.emf”
‘convert emf to jpg
snap.ConvertEMFToImage “2.emf”, “0.jpg”, 6000, 6000, 0

‘convert emf to tif, keep aspect ratio
snap.ConvertEMFToImage “2.emf”, “1.tif”, 6000, 6000, 1

Set snap = Nothing

The method ConvertEMFToImage is to convert EMF into raster images. The first parameter is the input EMF file, second is the output raster image, the third and fourth are the width and height for the raster image in pixels. The last paramater is to control if the raster image will keep the same aspect ration as to the original vector image.

 

 

 

Record audio with multiple sound cards

Our audio record object can support recording with multiple sound cards. You can do like this:

1. Create multiple audio record objects at initialization time like this. (Take VB.Net as example)

Public Class Form1
    Inherits System.Windows.Forms.Form
    Private rec As AudioCtl.CAudioRecord
    Private rec1 As AudioCtl.CAudioRecord
 
#Region ” Windows Form Designer generated code ”
    Public Sub New()
        MyBase.New()

        ‘This call is required by the Windows Form Designer.
        InitializeComponent()
        ‘Add any initialization after the InitializeComponent() call
        rec = New AudioCtl.CAudioRecord
        rec1 = New AudioCtl.CAudioRecord
        rec.SetSilenceLevel(1000)
    End Sub

 

2. Then the record objects can be used independently by setting the device index to different sound cards. You can record different source line for different sound cards and save the audio in different output files.

Html to image on Linux

If you want to convert html to image on linux, try out html2image linux

It is a command line tool that is easy to use.

We have tested it on the latest Redhat Fedora 5. To use it, open an XTerm window in Gnome, and play with the command line.

Some users may experience a problem that reports missing libpangocairo.

Here is the solution:

Download pango RPM here, extract it and install.

rpm -Uivh cairo-1.0.2-1.1.fc4.nr.i386.rpm glitz-0.4.3-1.1.fc4.nr.i386.rpm libpixman-0.1.5-1.1.fc4.nr.i386.rpm pango-1.10.3-1.1.fc4.nr.i386.rpm pango-devel-1.10.3-1.1.fc4.nr.i386.rpm

Then it should work. Email us if you need any help!