[comp.sys.mac.programmer] Curious problem with Imagewriter

gibson@penguin.cis.ohio-state.edu (william kerr gibson) (08/23/89)

As the subject heading says, I have a problem with the imagewriter.  I have 
been working with a program that prints mailing labels to the imagewriter.
Now when you print mailing labels you cant be bothered with page breaks so
you have to select "No gaps between pages" in the style dialog box. Now,
my print code is the same, but for some reason when I print with that
option the imagewriter decides to print a blank page before printing the
first page. I must have spent 12 hours pouring over the code and trying
different things before I decided to see if other programs have the same
problem. When I fired up MacWrite 5.0, it did the same thing but when
I printed from MacWrite II there was not a problem at all.  So I figure
there must be a solution to this. I looked in the tech notes but found
nothing.  I know that it can't be my fault because when I draw something
right after my first prOpenPage it draws on the second page of the printer.
So I need help. Is anyone familiar with this problem and how to fix it
without messing with the printhandle in a way that will get me into 
trouble with other printers? I am presently working in lightspeed pascal
if anyone can come up with some code for me.  Thanks for taking time
to read this, I greatly appreciate it.

		Kerr Gibson
   
-=-
Kerr Gibson CIS Dept OSU. (614)292-0915               __---------------------__
gibson@tut.cis.ohio-state.edu          _____________ /   >-------------------
att-cb!osu-cis!tut.cis.oh...!gibson   `-~~~~~~~~~"--'---/       /
OSU 2036 neil av. Col. Oh. 43210-1277    `---`==________/    Engage!

oster@dewey.soe.berkeley.edu (David Phillip Oster) (08/23/89)

Problem: select "no breaks between pages" and waste a sheet. It is
designed to work this way: when you select "no breaks between pages" you
get a rectangle that goes all the way to the edge of the paper. If the
program tries to draw on the top edge of the first sheet, it will jam the
paper in the feed rollers.

Does this happen if the first drawing is so far down the page there is no
chance of rewinding the paper enough to jam it (even in an imagewriter II,
which needs 1/4" more than an imagewriter 1.)

samalone@athena.mit.edu (Stuart A. Malone) (08/23/89)

In article <58212@tut.cis.ohio-state.edu> william kerr gibson <gibson@cis.ohio-state.edu> writes:

>...Now when you print mailing labels you cant be bothered with page breaks so
>you have to select "No gaps between pages" in the style dialog box. Now, my
>print code is the same, but for some reason when I print with that option the
>imagewriter decides to print a blank page before printing the first page. I
>must have spent 12 hours pouring over the code and trying different things
>before I decided to see if other programs have the same problem. When I fired
>up MacWrite 5.0, it did the same thing but when I printed from MacWrite II
>there was not a problem at all...

My understanding is that the ImageWriter print driver wastes the page in order
to avoid backing up the paper.  Choosing "No gaps between pages" gives a larger
printing area, but if you try to actually use the extra area at the top of the
first page, the ImageWriter goes forward to the next page rather than try to
back up to the beginning of the first one.  Perhaps MacWrite II didn't waste a
page simply because when you tested it you didn't put anything in that extra
space at the top of the first page, so there was no need to waste a page.

If I've got this right, you might be able to fake out the ImageWriter driver by
figuring out how much space you have to leave at the top of the first page to
avoid the wasted page, and offsetting your entire document by that amount.  Of
course, the user of this program would then have to offset the paper by this
amount to compensate.  But assuming that the paper doesn't jam when it hits the
paper bail, this should allow you to print on the entire first page.

				--Stuart A. Malone
				samalone@athena.mit.edu