From owner-freebsd-questions@FreeBSD.ORG Fri Oct 10 20:38:45 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 31E8016A4B3 for ; Fri, 10 Oct 2003 20:38:45 -0700 (PDT) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) by mx1.FreeBSD.org (Postfix) with ESMTP id EFB6D43F75 for ; Fri, 10 Oct 2003 20:38:43 -0700 (PDT) (envelope-from grog@lemis.com) Received: from blackwater.lemis.com (blackwater.lemis.com [192.109.197.80]) by ozlabs.org (Postfix) with ESMTP id 497B32BD4D for ; Sat, 11 Oct 2003 13:38:40 +1000 (EST) Received: by blackwater.lemis.com (Postfix, from userid 1004) id 8299951835; Sat, 11 Oct 2003 13:08:38 +0930 (CST) Date: Sat, 11 Oct 2003 13:08:38 +0930 From: Greg 'groggy' Lehey To: William O'Higgins Message-ID: <20031011033838.GH36024@wantadilla.lemis.com> References: <20031010123141.GA1925@sillyrabbi.dyndns.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7J16OGEJ/mt06A90" Content-Disposition: inline In-Reply-To: <20031010123141.GA1925@sillyrabbi.dyndns.org> User-Agent: Mutt/1.4i Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 cc: freebsd-questions@freebsd.org Subject: Re: writing pdfs X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Oct 2003 03:38:45 -0000 --7J16OGEJ/mt06A90 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Friday, 10 October 2003 at 8:31:41 -0400, William O'Higgins wrote: > I have grown tired of using MS Word as my standard document output > format. I haven't gotten OpenOffice to work under FreeBSD (and it isn't > my favourite tool by a long shot) and I am most happy generating text in > vi. PDF is eminently portable, and I think that it would suit my > purposes nicely. > > I had some thoughts about generating PDFs, but I was hoping for advice > about which tools to use. Should I just learn how to mark up a text > page manually (I write HTML almost as quickly as plain text)? Should I > learn TeX or some variant and translate it? I hear that PHP has some > excellent PDF-generation tools; should I write up a command-line > interpreter myself? Any suggestions would be appreciated. > > I did a bit of searching, but I didn't find any real *advice* on what > process to use, and most of the tools that I found are for viewing PDFs, > not writing them. PDF is a relatively unimportant part of the story. Most programs can generate PostScript, and ghostscript can convert PostScript to PDF. It comes with a script ps2pdf which does just that, though there are some options you can tweak. I use the following Makefile rule: .ps.pdf: $(GS) -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sPAPERSIZE=$(PAPER) -sOutputFile=$@ -c save pop -f $< PAPER is one of the identifiers defined in /usr/local/share/ghostscript/*version*/lib/gs_statd.ps. The real question was: which markup? Doubtless DocBook is the most recommendable, and it's very close in concept to HTML. I have lots of difficulty with it, though, and processing it is currently still a pain. You might like to look at the (barely documented) gmat port, which is what O'Reilly use to format their books. Apart from that, there's (La)TeX and groff. I started off with TeX and moved on to groff. Every time I go back to TeX, it drives me mad. groff is relatively easy to use, but most people consider it obsolescent. Greg -- When replying to this message, please copy the original recipients. If you don't, I may ignore the reply or reply to the original recipients. For more information, see http://www.lemis.com/questions.html See complete headers for address and phone numbers. --7J16OGEJ/mt06A90 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.0 (FreeBSD) iD8DBQE/h3s+IubykFB6QiMRAvDHAJ0ahTT59Ck547L8dVVGxDL6JNeKDQCfd1kq CzeMAM3csh5eDh1qk7iSQaI= =0wmm -----END PGP SIGNATURE----- --7J16OGEJ/mt06A90--