[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Groff] help with preview landscape preview

From: Bob Cannon
Subject: [Groff] help with preview landscape preview
Date: Fri, 12 Dec 2014 10:58:02 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0

I want to print and preview a table from within a Python program. I can do all but the preview in landscape mode.

Print portrait:

def printFile(self, fname)
    command = 'groffer -l ' + fname
    subprocess.Popen(command, shell=True)


Preview portrait (Python code is the same for this and all below):

    command = 'groffer -Tps -X ' + fname


Print landscape:

files to be printed or previewed in landscape mode have these two lines at the top
        .ll = 9i
        .po = 1.75i
    command = 'groffer -P-l -l ' + fname


Preview landscape:

same two lines at the beginning of the file
    command = 'groffer -Tps -P-l -P-pa4 -X -Z fname | gxditview -


The first three work beautifully. The command for previewing landscape is one of many that I have tried -- all with no success. gxditview appears to be required when previewing landscape mode, but not for portrait. When printed in landscape mode the table is exactly as requested (line length and page offset). When previewed in landscape mode the white space between columns is very wide, but the last column extends outside the box. The manual for gxditview suggests using geometry. I've tried geometry, but all that it does is change the size of the window, but it doesn't affect the appearance of the table.

Here's the file that I use for landscape testing. (I use a different file for portrait.)

.ll 9i
.po 1.75i
.sp 0.5i
.ft B
.ce 4
Header line 1
Header line 2
December 12, 2014

Names Report
.ft R
box, expand, tab(`);
cI cI cI cI cI cI.
n l l l l c.
000`Smith`Harold`113 Stanford`Hollywood, CA 23523`923-123-3241
001`Lewis`Margaret and Bill`235 Williston`Kansas City, MO 32594-3242`232-827-3294
002`Kneifel`Ernest and Helen`123 Oak`Chicago, IL 89694`892-325-2379
003`Summers`Maurice and Ethel`2325 First St. Apt 24`Los Angeles, CA 9725-1279`323-695-2353
004`Heath`Harold and Maude`9372 Elm St.`Monroe, AL 23542`694-325-5745

reply via email to

[Prev in Thread] Current Thread [Next in Thread]