html to fax with html snapshot

Some people may want to fax a html document in their application. First it is necessary to convert the html document into image that the fax driver can understand. Fax machines typically support TIFF format which supports multiple encoding scheme. Html Snapshot has full support for TIFF encoding. It supports LZW, CCITT3, CCITT4 and RLE (Pack bits) encoding. So you can easily convert a html document into fax compatible TIFF file with Html Snapshot.

 

If you are using Windows Faxing Service to send a fax, remember that it has some special requirements on the TIFF file.

The fax service will accept a TIFF file for transmission if it has the following properties:

  • Compression is either 1 (no compression) or 4 (CCITT Group 4 fax encoding)
  • Image width is 1728 pixels
  • X-Resolution < = 204dpi and Y-Resolution <= 200dpi
  • All the pages have the same Y-resolution

 There is a detailed html to TIFF demo in the trial version of html snapshot. you can find it under demovbscripttifftest.vbs. Feel free to drop us an email if you have other questions.

 

 

Text to speech in IIS

Some customers want to convert text to audio in web sites with Active TTS. They may use ASP, ASP.Net as program languages and use IIS as the web server.

If they query the voice installed on the system in such script languages, they will find there are only SAPI4 voices listed. The reason behind it is that SAPI5 voices needs more privilege than the normal IIS user account. IIS has its special account management. It is possible to set the account in IIS to use SAPI5 voices. You can refer to html to image in IIS for some ideas. But here I am suggesting an alternative way.

We have provided a TTSService demo in the trial version of Active TTS. It is a win32 service program. The work flow is:

1. TTS Service is started when windows starts. It runs at background with a SYSTEM or administrator account.  It listens to a private port for local HTTP connection.

2. In ASP or ASP.Net, handle the http request from web user. Compose the text that is to be converted to audio. Save the text to a local disk file. Send the text file name and the audio file name in a HTTP request to the port TTS Services listens to.

3. TTS Service reads the file name and converts the text into audio with the help of Active TTS object. The audio will be saved into the audio file name embedded in the HTTP request.

4. ASP or ASP.Net send response to the web user to tell the conversion is completed.

We can provide TTSService source codes to those who are interested. It is written in Delphi. For those who don’t program in Delphi, it is still useful to refer to it for understanding the ideas.

 

eee.jpg

 

Something about .Net RSA

Recently I have a project that needs encryption support. The requirement is to encrypt with the private key of RSA algorithm and decrypt with the public key. I went the algorithm again and thought it is doable, so I began to write a prototype with c#. But I got an ‘invalid key’ error when decrpting the data encrypted from the private key.
After some search,I learnt that it is by design of .Net framework. It disables decryping with public key for security reason.
Finally I came to implement the RSA algorithm myself to achieve what I want to do.

JPEG to html

DSCN1414.JPGSome times I saw some visitors to our web site by search for “JPG to html”.

We don’t have a jpg to html product. What we have is html to image solution including end-user product Html To Image and development tool Html Snapshot. Their function is to convert html to image such as JPG, PNG, TIFF and GIF.

Come back to the topic “JPG to html”, frankly speaking, I don’t quite understand what it exactly means. JPG is a graphic format while html is a markup language in text format. The procedure of “convert html to jpg” implemented by our products is not reversible. This means, you can not generate the same html text file from the image.

Actually it is a quite difficult problem for computer to recognize the text or image on a big graphics. OCR or computer vision is trying to achieve this goal but is not successful yet.

Or does it mean to put an image into html page? If so, it is another problem: html page authoring. By making use of a WYSIWYG html editor, it is easy to put jpg to html in a few mouse clicks.

Don’t buy wrong product.

We have a long list of order page for our products. Each product occupies a row of a table.

We are currently using the services of two online shareware trade company: Qwerks and Regsoft. Both are well-known and among the best.

Before clicking the links going to qwerks or regsoft, please make sure you are in the correct row for the product. :)

When you goes to the order page on qwerks or regsoft. You will also notice the product name on top of the order page.

Please do have a look and double check.

Some customers do have made such mistakes. If you take a look before going ahead, you can save both your and our time.

Thanks 

A stress test example

 

When developing our development tools product, we have consider the stress DSCN1338.JPGtesting scenarios. Since our product might be used in server scenarios which means it should be stable, reliable.

 

We try hard to make sure the function still works after calling thousands of times. So we design a bunch of stress test cases for our products.

Here is a simple testing case for our PDF split and merge product. It is an ActiveX component that supports easy pdf split and merge.  

Private Sub Command1_Click()
For I = 1 To 100  ‘Change this number if you want more
DoMerge
Next I

End Sub

Private Sub DoMerge()
Dim pdf
Set pdf = CreateObject(“PDFSplitMerge.PDFSplitMerge.1″)

pdf.Split “..1.pdf”, “1;1;1″, “..sp1-%d.pdf”
pdf.Split “..1.pdf”, “1;2;3;4;1-2,3-4;1″, “..sp%d.pdf”

pdf.Merge “..sp0.pdf|..sp1.pdf”, “..m1.pdf”
pdf.Merge “..1.pdf?1-2|..sp1.pdf”, “..m2.pdf”
pdf.Merge “..1.pdf?1-2|..sp1.pdf?2″, “..m3.pdf”

Set pdf = Nothing
End Sub

How to do manual registration of Html To Image.

Some people experienced strange problem when registering html to image from the UI. We usually solve it by manually registering. Here is the process:

1. Make sure you are running latest build of Html To Image. It can be always downloaded here.

2. Make sure you have closed Html To Image program. i.e., it is not running.

3. Open the folder C:Program FilesHtml To Image. This is the default installation folder of html to image. Double click to open the file strings.ini in notepad.

Now edit the file, find the following lines. If they are not there, add them directly.

[Common]
Name=User Name
Code=ABCXXXX-XXXX-XXXX-XXXX

Replace “User Name” with your own name when purchasing. Replace the “ABCXXXX-XXXX-XXXX-XXXX”  with the code you get in the order email

4.  restart Html To Image, you should be registered then.

Still not?  let me know :)

 

DSCN1323.JPG

 

 

Using Active TTS in C#

Active TTS is a standard COM component that is supported by .Net framework.

 

Here is a step by step example of using Active TTS in a C# winform project with VS2003.

1. Create a C# winform project by using the IDE wizard.

2. Add reference to TTSObj.dll by clicking main menu item, Project->Add Reference, pop up the dialog, choose “COM” tab, click the “browse” button to pick up the TTSobj.dll (You can find it in the default Active TTS installation folder which is C:Program FilesActive TTS).  

activetts.jpg

  Click OK, you will find TTSObj name space in your solution explorer.  

solutiontts.jpg

  3. Now you can use Active TTS object like a normal C# class in your code.  For a working demo, please look into the DemoCSharp in the trial package. 

You can see how easy it is to incorporate the text to mp3 function in your application.

            ttsObj = new CTextToSpeechClass();

            comboBox1.Items.Clear();
            for(int i = 0; i < ttsObj.VoiceCount; i++)
            {
                comboBox1.Items.Add(ttsObj.GetVoiceName(i));
            }
            comboBox1.SelectedIndex = 0;
            ttsObj.VoiceIdx = comboBox1.SelectedIndex;

            ttsObj.OnTTSEnd += new _ITextToSpeechEvents_OnTTSEndEventHandler(ttsObj_OnTTSEnd);
            ttsObj.OnTTSStart += new _ITextToSpeechEvents_OnTTSStartEventHandler(ttsObj_OnTTSStart);
            ttsObj.OnTTSProgress += new _ITextToSpeechEvents_OnTTSProgressEventHandler(ttsObj_OnTTSProgress);
            ttsObj.OnTTSWord += new _ITextToSpeechEvents_OnTTSWordEventHandler(ttsObj_OnTTSWord);

 

 

TTS on Windows

 

DSCN1300.JPG

  

Windows currently has two speech APIs. One is SAPI4 on Windows 2000. The other is SAPI5 since Windows XP.

However, it is possible to use SAPI5 on windows 2000 or even windows 9x. You can install Speech SDK 5.1 which has included SAPI and some free TTS voices as well as speech recognition engines.

Our TTS products, Active TTS/Speak Aloud support both SAPI4 and SAPI5 voices. It also means they depend on SAPI4 or SAPI5. So the machines should have SAPI4/SAPI5 and some TTS voices installed beforehand.