Olivier Lefevre wrote:
I could not find a list the possible values nor an explanation
of what they do, only a hint that pdl might be a good idea.


It now occurs to me that PDL must stand for Page Description Language,
i.e., just what I wanted but you say it's normally a no-op.


I don't know what you are driving at [with you remarks on Windows printers]


I am vague on the architecture of Windows printing. I was hoping that in the
case of "real" printers (i.e., with their own rasterizers) applications are
talking directly to the printer driver that is installed with the printer,
not to some generic Windows printer driver. If that's not the case maybe
for high-quaklity printing you are better off generating PostScript and
sending that directly to the printer? A few printers also understand PDF.


Postscript also doesn't support translucency except in some unlikely and
esoteric implementations
and whilst windows provides a way to see if a printer is a postscript
one it provides no such API for determining
if its a PDF printer.




Are you seeing this only when printing a Swing UI? How are you printing?


Yes, I was printing a JPanel with plots in it, i.e., just text ad line art
but with some transparency.


Are you calling "component.paint(printerGraphics) on the printer graphics.


No I was calling print and I even turned off Swing buffering manually but
I was still getting bitmaps. However now that you told me that print never
rasterizes I went back and I realized the problem is that a sub-widget was
doing its own buffering for performance reasons and I was not turning off
_that_. It seems to work fine now. Thanks!

While we are talkinmg, I have a subsidiary question. When printing or saving
to file the print size is not necessarily what is shown on the screen. One
can simply apply a scaling transform to the graphics object or one can keep
around a private, non-displayable copy of the widget and resize that one
before printing it. The first solution is simpler but are there any gotchas
with rescaling that I am not aware of?



I can't say what you are not aware of until you tell me everything you
are aware of.

Image rescaling will work but be blurry like you complained about to
begin with.
One common mistake is to assume that text scales linearly from screen to
printer.
It doesn't.

If  you scale the graphics 4x then a specific piece of text might scale
by 3.87 or 4.23, or 3.95 , or ..

you can only measure text in the right context. So code that supports
printing of a layed
out component needs to use the screen FontRenderContext for the text.

-phil.
Regards,

-- O.L.



===========================================================================
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".

Reply via email to