Hi,
#1 The first of your examples - the one with the gray background -
uses "1.1" API printing and its possible that you may be running
into a known bug that affects the 1.1 API where the ColorModel of
the screen and printer DC are assumed to be the same but aren't.
This is just a guess however.
What OS version & printer are you using? Is this happening with
different printers? Or just one type?
#2 There is no API to specify printer resolution to PrinterJob - yet.
However it should do by default what you are doing explicitly with
PrintJob. ie scale from image space to printer device space at
whatever resolution is currently the default for the printer.
User space is by default 72 dpi and conceptually the operation goes
via user space which could result in loss of resolution, but I
don't think that will actually happen in the current implementation.
However to guard against it you may want to scale user space to match
image space to avoid any loss of resolution in intermediate operations.
#3 I would guess that your image is at a high resolution.
Yes, this could be heavy on memory and the printing implementation
needs tuning to be smarter about this in some cases.
You could explicitly draw the image as subimages which should keep peak
memory usage down.
BTW Is it Java heap memory or native heap memory that you are having
the most problems with?
-phil.
> X-Accept-Language: ja
> Date: Mon, 5 Jun 2000 10:21:00 +0900
> From: Taku Honda <[EMAIL PROTECTED]>
> Subject: [JAVA2D] Gray Background ? in printing bilevel TIFF
> Comments: To: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
>
> Hello everyone.
> This is my first post to this list.
>
> Question 1.
> I tried the following code "TiffPrintTest.java" to print
> bilevel(Black and White) TIFF files. The target TIFF file
> is a G4 400dpi document (BLACK strings on WHITE background).
> What I got on the printer is BLACK strings on a GRAY
> background which looks like filled with small
> black-and-white patterns.
> I am quite a beginer and have no idea why background
> is GRAY.
> Does anyone know the reason and how to get the WHITE
> background ?
>
> Question 2
> I tried another code "PrintableTest.java" and got WHITE
> background. But I could not find out how to set
> PRINTER-RESOLUTION to PrinterJob. (I could set
> PRINTER-RESOLUTION to PrintJob using PageAttributes's
> setPrinterResolution() method)
> Still more, to print G4 TIFF , memory consumption is
> unacceptably huge.
> Does anyone know how to set PRINTER-RESOLUTION to
> PrinterJob ?
> How can I print G4 TIFF with small memory ?
> Any suggestion would be appreciated.
>
===========================================================================
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".