[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

More fun with postscript



Can anyone explain this one to me?

I've been wrestling with .spf output for aaaages trying to get the
margins exactly where I want, when I eventually found out that certian
sqr 'features' prevent me from getting as close to the page edges as the
printer will allow.

Anyway, after a bit of fiddling I managed to get postscript output
happening, and I've got the margins where I want. Almost.

For some reason the first page has about 4mm chopped off the top margin,
but each page after that is fine. I blamed the printer at first (a
laserjet 4si MX), but when I tried with another printer (a QMS), it had
the same problem.

I know what you're thinking, use 'new-page' before I start printing
data, right? Nope, seems there's some extra funky stuff going on, the
page after the break still has the chopped top. I even tried displaying
some text before using new-page, but I still got the same error.

In a fit of inspiration I looked at the ps source to see if there was
any difference in the code behind breaking the between using new-page
and the break as handled by sqr, and would you believe it, there is
none.

The test program I'm using is small, so here it is. Run it, have it work
properly, tell me, and make me feel really bad. I've hardcoded the lines
because using a bottom margin didn't work, but that's another story. The
reason the margins/lines etc is so important is because I'm printing to
A4 sheets of mailing labels, and it's nothing short of a nightmare
setting this up.

BEGIN-SETUP
  declare-layout default
        paper-size=(A4)
        left-margin=5mm
        top-margin = 10mm
        max-lines = 67
        line-height = 12
        char-width = 6.1
  end-declare
END-SETUP

BEGIN-PROGRAM
        use-printer-type ps
   DO Main

END-PROGRAM

BEGIN-PROCEDURE Main
        alter-printer font=5 point-size=10
        print 'test page' (1,1)
        new-page
        let #i = 1
        print #i (1,1)
        add 1 to #i
        while #i < 100
                print #i (+1,1)
                add 1 to #i
        end-while
END-PROCEDURE


Vital stats:
SQRv4.03 for Oracle on win95
PrintFile v2.0 so I can dump ps files to the printer from the desktop
Sagittarius
Turn offs are smoking, ancho- oh wait, too much information...

Thanks all.

Matt