From owner-freebsd-questions@FreeBSD.ORG Tue Jan 30 00:58:37 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8B2F516A5A8 for ; Tue, 30 Jan 2007 00:58:37 +0000 (UTC) (envelope-from infofarmer@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.175]) by mx1.freebsd.org (Postfix) with ESMTP id 2444613C478 for ; Tue, 30 Jan 2007 00:58:36 +0000 (UTC) (envelope-from infofarmer@gmail.com) Received: by ug-out-1314.google.com with SMTP id o2so1304716uge for ; Mon, 29 Jan 2007 16:58:35 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=DpSr9RKarlBgDUA3q5XvdygLAz2zGLp7xrkF2j1XVV3xHyMmFqY5z8/nIhDvAKN5ECJofKAdyCixcf9wJ8bDwFN10Oans68LYe79EYrcUGvWPbuSsdoMje3hSEA330WKI1szYXafviQSF+qzMYe5JR6L4SmENBCBtjsGPlbDCMU= Received: by 10.78.193.19 with SMTP id q19mr4574921huf.1170118714563; Mon, 29 Jan 2007 16:58:34 -0800 (PST) Received: by 10.78.170.11 with HTTP; Mon, 29 Jan 2007 16:58:34 -0800 (PST) Message-ID: Date: Tue, 30 Jan 2007 03:58:34 +0300 From: "Andrew Pantyukhin" To: "Sandy Rutherford" In-Reply-To: <17231.36763.362140.805502@szamoca.krvarr.bc.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200510081736.37212.vizion@vizion.occoxmail.com> <43486945.7000906@freebsd.org> <17224.55329.435613.310206@szamoca.krvarr.bc.ca> <17231.36763.362140.805502@szamoca.krvarr.bc.ca> Cc: freebsd-questions@freebsd.org, Colin Percival , Vizion Subject: Re: chm file conversion? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: infofarmer@FreeBSD.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jan 2007 00:58:37 -0000 On 10/14/05, Sandy Rutherford wrote: > >>>>> On Sun, 9 Oct 2005 12:51:43 +0400, > >>>>> "Andrew P." said: > > > On 10/9/05, Sandy Rutherford 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|\||gs; s|\||gs; s|\||gs; s|\<\/?body\>||g; s|\||g; s|\||gs; print;