Friday, September 24, 2004

CES - Post Conversion Script

In this article, I present an almost hidden but extremely powerful feature of Copernic enterprise Search: the Post-Conversion Scripts.

Script page can be obtained in the Admin page at Configuration > Converters > Advanced.

At this place you can load a script (vbscript ou jscript) that will be executed after CES find and convert a document but before it is stored in the index. It gives you the possibility to manually change the fields of the document as well as add special meta-data or proceed to a custom action.

Here, I give a sample script that dump the file on disk in the same folder than the original but in text format. This is quite usefull to convert pdf documents ;)

fileName = DocumentInfo.URI
fileName = Replace(fileName, "file:///", "")
fileName = fileName & ".cache"

strText = PostConversion.Text.ReadString(65535)

Const adTypeText = 2
Const adSaveCreateOverWrite = 2
Dim BinaryStreamSet BinaryStream = CreateObject("ADODB.Stream")
BinaryStream.Type = adTypeText
BinaryStream.OpenBinaryStream.WriteText strText
BinaryStream.SaveToFile fileName, adSaveCreateOverWrite

Note the use of DocumentInfo to access CES original document information.
Note the use of PostConversion to access CES converted document information.

In product documentation, Copernic suggest the use of vbscript FSO for file handling.
However, I had some problems with special chars found in many pdf documents.
The ADODB.Stream object seems to work well.

Wednesday, September 22, 2004

A browser for Google?

Looks like Google registered the domain
Speculators say that Google is building a browser on top of Mozilla in order to compete Microsoft Internet Explorer.

Friday, September 10, 2004

Signing a VBA Project

This post is a prelude to a longer one I'm writing (to be published soon).

Since it will requires interacting with MS Office Macros, you'll need to sign your code with a digital certificate.

This MSDN article explains how to obtain a certificate for development purpose. If you own a real certificate, this is not a problem!

Tuesday, September 07, 2004

ASP.NET can be so slow

A major feature of ASP.NET is the "__ViewState" hidden variable that is passed back and forth between the client and the server.

The ViewState allows forms to keep their state (never being cleared) between postbacks. See this article for a good intro.

However, I had a real problem of speed using datagrid made of custom web controls. When populating it with 700 rows, the ViewState sized to 1 Mb... Each page transition was a pain.

The solution is to turn off ViewState for each web control that don't needs it! Each control has an attribute ".EnableViewState" that allows it.

Word advanced spelling capabilities

did I mean "tôt" (early) when I write "connaitre" (to know)?
hum.... not really.

Friday, September 03, 2004

What's the link between Starbuck and XP SP2?

Only "Google News" knows...

Thursday, September 02, 2004


In a previous post, I talked a bit about the iRider browser.
My evaluation finished and I really felt it worth the price.
I bought a license and now, I'm totally addicted to the concept.
I just can't imagine using a conventionnal browser again.

The main points of addiction are:
  1. Possibility to have 20 home pages that load simultaneously at startup.
  2. The navigation panel that keeps all viewed pages opened in a hierarchy. (There is some drawbacks. For instance, if you reach the same page twice but with different cookies or session variables, the browser will show the old page)
  3. The "surf-ahead" function that allows to send pages in backgroud for loading without quitting your current location.

It REALLY worth a try.