> He all. I was wondering, is there any way to override the default pageFormat
> settings or printer margins with java.awt.Print?
sure, there's an API on PrinterJob to set the pageformat.
> If I pop up a page dialog box, I can only set the margins to a minimum of
> .25".
If the page dialog box is only allowing you to set margins to 0.25" then
that is because that's the limit of what the printer hardware can do.
Anything less than that would be lost.
That's nothing to do with the Java printing API, that's the printer's
physical limitation.
If you need to print closer to the margin than that you'll need a printer
that can do this.
> (ImageableX, ImageableY) clip the text if I don't use the translate method.
> However, using the translate method shifts everything by 72 pixels to the
> right and down.
>
> needs to be ina specific spot. The only problem is that the default margins
> (ImageableX, ImageableY) clip the text if I don't use the translate method.
The translate is just so that your translated user space (0,0) is within
the clipped area.
if you want to address the page relative to its physical 0,0 then there's
nothing to stop you doing that (just don't do the translate) but you'll
still probably want to set the imageable x & y to the minimum the printers
supports so that you can print over as much of the page as possible on
the printer, and be aware of that physical limitation so that you can format
your content within the printer's limitations.
Note that if you create a PageFormat containing a page with zero margins
and call "PageFormat PrinterJob.validatePage(PageFormat page)" that you
would get back a PageFormat which contains those minimum margins.
BTW it would be useful when reporting problems to include in your
email things like the JDK version you are using, the O/S you are using
and the printer model you are using.
I am guessing JDK 1.3 and NT 4.0 since that seems most common.
-phil.
> X-Priority: 3
> X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
> Date: Thu, 24 Aug 2000 16:48:52 -0500
> From: Nebulus Designs <[EMAIL PROTECTED]>
> Subject: [JAVA2D] Overriding pageFormat and default margins - HELP!
> To: [EMAIL PROTECTED]
>
> He all. I was wondering, is there any way to override the default pageFormat
> settings or printer margins with java.awt.Print?
>
> I've got some text that I'm trying to print on preprinted stock, so the text
> needs to be ina specific spot. The only problem is that the default margins
> (ImageableX, ImageableY) clip the text if I don't use the translate method.
> However, using the translate method shifts everything by 72 pixels to the
> right and down.
>
> If I pop up a page dialog box, I can only set the margins to a minimum of
> .25".
>
> Is there any way to set ImageableX/Y to 0, or does anybody have a trick for
> overcoming this? Thanks for the help!
>
> Pat Friedl
> Nebulus Designs
> www.nebulus.org
> ICQ: 3704756
> Efax (412) 812-0296
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff JAVA2D-INTEREST". For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".