[fpc-pascal] How create a full text search with TChmWriter?

Andrew Haines andrewd207 at aol.com
Tue Feb 21 15:24:58 CET 2012


On 02/21/2012 03:18 AM, Mattias Gaertner wrote:
> On Mon, 20 Feb 2012 23:59:18 -0500
> Andrew Haines<AndrewD207 at aol.com>  wrote:
>
>>
>> 30% bigger than the size of the uncompressed html files?!
> Yes.

does lazarus/docs/html/build_lcl_docs --outfmt chm work for you?
I get a 8mb lcl.chm file. if --outfmt html then the lcl folder has 74mb 
of html files.

Your chm file should not be bigger than the the uncompressed files 
unless you are writing only
a couple of tiny html files.


>
> I attached the example.chm file that I made a couple of minutes ago
> using chmmaker with the project in the example subfolder. Can you see if
> it works for you? I opened it in lhelp and the toc, index and search
> were all working.
> Yes, that has a search. And it works.
> I wonder, what you are doing different.
>
>
>

You said in another mail that you are writing the html files from 
memory. (You must have a good memory! ;) I guess then you are using 
AddStreamToArchive. FullTextSearch must be set before this is called 
because the files are scanned as you add them. Also AddStreamToArchive 
has a default parameter Compress: Boolean, are you setting this to false?

PostAddStreamToArchive should only be used inside code called from the 
OnLastFile callback.

Can you send me the non working example.chm?

Thanks


Andrew





More information about the fpc-pascal mailing list