Skip to main content

[JAVA2D] Print dialog Print range broken in 1.5?

2 replies [Last post]
Anonymous

The Print dialog Print range seems to be broken in jre 1.5.0_01 on Windows
XP. When I try to print the first page only of a multi page document, all
of the pages are printed. It works fine when using 1.3.1_09.

I can't seem to find this problem on the bug parade, has anyone else seen
it?

Thanks,
Karen

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".
[att1.html]

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Karen Johnson

I can reproduce this problem by adding a couple of lines to SimpleBook.java
from the tutorial
http://java.sun.com/docs/books/tutorial/2d/printing/collection.html
It
looks like a bug to me, unless someone can explain otherwise. It works
fine in 1.4.1.

//Do this before opening the print dialog
PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
aset.add(PrintQuality.DRAFT);

//Change job.print() to
try { job.print(aset); }

_____

From: Karen Johnson [mailto:kjohnson@SPICER.COM]
Sent: Thursday, February 17, 2005 3:50 PM
To: JAVA2D-INTEREST@JAVA.SUN.COM
Subject: [JAVA2D] Print dialog Print range broken in 1.5?

The Print dialog Print range seems to be broken in jre 1.5.0_01 on Windows
XP. When I try to print the first page only of a multi page document, all
of the pages are printed. It works fine when using 1.3.1_09.

I can't seem to find this problem on the bug parade, has anyone else seen
it?

Thanks,
Karen

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".
[att1.html]

Jennifer Godinez

Hi Karen,

When you pass an attribute set in print method, this takes precedence
over previous settings. The print(aset) is normally used to pass user
setting from the common print dialog i.e.
printDialog(PrintRequestAttributeSet attributes). If you use this
instead of the native dialog, you will get the correct output.

Jennifer

Karen Johnson wrote:
> I can reproduce this problem by adding a couple of lines
> to SimpleBook.java from the tutorial
> http://java.sun.com/docs/books/tutorial/2d/printing/collection.html It
> looks like a bug to me, unless someone can explain otherwise. It works
> fine in 1.4.1.
>
> //Do this before opening the print dialog
> PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
> aset.add(PrintQuality.DRAFT);
>
> //Change job.print() to
> try { job.print(aset); }
>
> ------------------------------------------------------------------------
> *From:* Karen Johnson [mailto:kjohnson@SPICER.COM]
> *Sent:* Thursday, February 17, 2005 3:50 PM
> *To:* JAVA2D-INTEREST@JAVA.SUN.COM
> *Subject:* [JAVA2D] Print dialog Print range broken in 1.5?
>
> The Print dialog Print range seems to be broken in jre 1.5.0_01 on
> Windows XP. When I try to print the first page only of a multi page
> document, all of the pages are printed. It works fine when using 1.3.1_09.
>
> I can't seem to find this problem on the bug parade, has anyone else
> seen it?
>
> Thanks,
> Karen
>
> ===========================================================================
> To unsubscribe, send email to listserv@java.sun.com and include in the
> body of the message "signoff JAVA2D-INTEREST". For general help, send
> email to listserv@java.sun.com and include in the body of the message
> "help".===========================================================================
> To unsubscribe, send email to listserv@java.sun.com and include in the
> body of the message "signoff JAVA2D-INTEREST". For general help, send
> email to listserv@java.sun.com and include in the body of the message
> "help".

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".