il 07.12.2011 15:39, Scrive Tobias Priebs 109177312:
> Hello,
>
> ich have the problem to print reports with java directly from a AS/
> 400 system.
> Currently I create a SpooledFiledOutputStream, on this stream I create
> a AFPDSOutputStream.
From which package does this class come from?
> My problem is that the gray levels are not printed correct. The geray
> level get to fast to dark, so that the most pixels are black. I think
> that the resolution or the raster is not fine enough.
> Does somebody where I can solve the problem?
> Does somebody now where i can change the settings for gray levels on
> the AS400?
It's not matter of AS400, but the way the printer is configured. Grey
levels colors and resolution are chosen specifying an IMGCFG in the
printer configuration. Usually the IMGCFG should match the phisical
printer characteristics, but you can sapecify a different one. For
example: assume you have a 600-dpi HPPCL printer, in the printer
configuration, IMGCFG parameter, you should specify *IMGA05 for a color
printer or *IMGA02 for a b/w one. But you are free to specify *IMGA01,
that's for a b/w 300-dpi, and will have a mismatch at print time.
Look at the help for IMGCFG parameter in CHG/CRTDEVPRT command, there's
a long list of printers with the configuration name suggested.
There's a PrintObjetc.ATTR_IMGCFG option too, but I'm not sure where you
can use it.