Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Oct 2005 21:26:44 +1000
From:      Peter Jeremy <PeterJeremy@optushome.com.au>
To:        Ceri Davies <ceri@submonkey.net>, freebsd-www@freebsd.org, hrs@freebsd.org
Subject:   Re: Building a local copy of www.freebsd.org
Message-ID:  <20051010112644.GB2482@cirb503493.alcatel.com.au>
In-Reply-To: <20051010093553.GI99170@submonkey.net>
References:  <20051008100325.GY72352@cirb503493.alcatel.com.au> <20051008110155.GW99170@submonkey.net> <20051008232727.GB223@cirb503493.alcatel.com.au> <20051010093553.GI99170@submonkey.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 2005-Oct-10 10:35:53 +0100, Ceri Davies wrote:
>On Sun, Oct 09, 2005 at 09:27:27AM +1000, Peter Jeremy wrote:
>
>> I found another problem triggered by a local change I've made: I have
>> my troffrc set for A4 paper (.pl 29.7c) and this causes
>> doc/share/images/books/handbook/advanced-networking/net-routing.eps to
>> fail with reports of "blank page!!" and "no bounding box".  The
>> problem appears to be that "groff net-routing.pic" results in a small
>> picture right at the top of the page - apparently above the 11" point.

To be precise, the bottom of the net-routing boxes are at 794pt.  The
top of a letter page is 792pt.

>> When "-sPAPERSIZE=letter" is specified during the EPS conversion, the
>> picture is cropped off, resulting in a blank page.  Is there a
>> particular reason for explicitly specifying the papersize in the EPS
>> conversion?  The ps2epsi script doesn't bother doing this.
>
>The commit log for that line of doc.images.mk says:

Sorry for not explicitly mentioning doc.images.mk.

> revision 1.26
> date: 2003/12/30 21:41:17;  author: hrs;  state: Exp;  lines: +32 -8
> Fix problems when ghostscript with A4=yes is used.
>
>I remember those problems with ghostscript, but the problems you're
>describing presumably weren't apparent.  If you try removing that
>argument from doc.images.mk, do you end up with sensible output?

I have "A4=yes" and "PAPERSIZE=a4" in my /etc/make.conf.  In addition,
I have the above patch to troffrc and the following patch to the groff build:
RCS file: /usr/ncvs/src/gnu/usr.bin/groff/Makefile.inc,v
retrieving revision 2.11
diff -u -r2.11 Makefile.inc
--- Makefile.inc        10 Jun 2005 07:06:07 -0000      2.11
+++ Makefile.inc        4 Aug 2005 09:13:15 -0000
@@ -6,7 +6,7 @@
 # Define `page' to be letter if your PostScript printer uses 8.5x11
 # paper (USA) and define it to be A4, if it uses A4 paper (rest of the
 # world).
-PAGE=letter
+PAGE=A4
 
 # Normally the Postscript driver, grops, produces output that conforms
 # to version 3.0 of the Adobe Document Structuring Conventions.

The Makefile.inc patch controls the content of the various DESC files
the relevant one here being /usr/share/groff_font/devps/DESC.

I've worked through the various combinations with the following results:

+----- ".pl 29.7c" in /usr/share/tmacs/troffrc
| +--- "papersize a4" in /usr/share/groff_font/devps/DESC
| | +- "-sPAPERSIZE=letter" in doc.images.mk
V V V
Y Y Y  ghostscript reports "blank page"
Y Y N  OK
Y N Y  OK
Y N N  ghostscript dies "Error: /rangecheck in --.getbitsrect--"
N Y Y  ghostscript reports "blank page"
N Y N  OK
N N Y  OK
N N N  ghostscript dies "Error: /rangecheck in --.getbitsrect--"

I've tried fiddling with various other paper sizes in ghostscript and
can't find a combination that works in all cases.  Given that I've
change my base system configuration, I suspect that I'll need to put
up with patching my doc.images.mk as well.

I don't understand why ghostscript is happy to have "-sPAPERSIZE=letter"
with A4 input but blows up with "-sPAPERSIZE=a4" (or legal or archA or
specifying mixed widths and heights) when fed letter input.

-- 
Peter Jeremy



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051010112644.GB2482>