Date: Tue, 30 Jan 2007 03:58:34 +0300 From: "Andrew Pantyukhin" <infofarmer@gmail.com> To: "Sandy Rutherford" <sandy@krvarr.bc.ca> Cc: freebsd-questions@freebsd.org, Colin Percival <cperciva@freebsd.org>, Vizion <vizion@vizion.occoxmail.com> Subject: Re: chm file conversion? Message-ID: <cb5206420701291658v118462e4g8aa35521bcd4075f@mail.gmail.com> In-Reply-To: <17231.36763.362140.805502@szamoca.krvarr.bc.ca> References: <200510081736.37212.vizion@vizion.occoxmail.com> <43486945.7000906@freebsd.org> <17224.55329.435613.310206@szamoca.krvarr.bc.ca> <cb5206420510090151s2e170406u3bd95b5af59f905f@mail.gmail.com> <17231.36763.362140.805502@szamoca.krvarr.bc.ca>
next in thread | previous in thread | raw e-mail | index | archive | help
On 10/14/05, Sandy Rutherford <sandy@krvarr.bc.ca> wrote: > >>>>> On Sun, 9 Oct 2005 12:51:43 +0400, > >>>>> "Andrew P." <infofarmer@gmail.com> said: > > > On 10/9/05, Sandy Rutherford <sandy@krvarr.bc.ca> wrote: > >> Colin, > >> > >> On Sat, 08 Oct 2005 you wrote: > >> > >> > Vizion wrote: > >> >> As per subject - does anyone know of any utils for converting microsofts > >> >> compiled help files for use on freebsd? > >> > >> > I've found converters/chmview to be useful in the past. > >> > >> Anything available for converting chm to pdf or ps? I believe that > >> there are some programs for doing this under MS Windows. > > > Just print it to a ps file. Pdf and ps are easily > > interconvertible. > > I know. That's not the issue. xchm only supports printing one page > at a time, which a cumbersome way to go about printing the entire > document to file. There is a box in the print dialogue that you can > tick in order to print the entire document. However, it doesn't work. I've just stumble upon a similar task. The way I went is decompiling chm with archmage into separate html files, concatenating the ones I need into one with cat, and cleaning the result up with a simple perl script (below). Printing an html file is another problem (it's not that easy to print 2Mb of html text)... sat@amilo:~% cat bin/cleanchm #!/usr/bin/perl -wT use strict; local $/; local $_ = <>; s|\<\/?html\>||g; s|\<META.*?\>||gs; s|\<head.*?head\>||gs; s|\<script.*?script\>||gs; s|\<\/?body\>||g; s|\<table.*\n.*\n.*prev.*\n.*\n.*next.*\n.*table\>||g; s|\<span class="v1".*?span\>||gs; print;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?cb5206420701291658v118462e4g8aa35521bcd4075f>