I create a PDF file using the PdfGraphics2D. I draw text is one of two ways.
        1. g.drawString (myString, pen.x, pen.y);
        2. layout.draw((Graphics2D) g, pen.x, pen.y);

When I use drawString, the text (in the PDF file) looks nice and smooth.
However, its measurements are wrong. It depends on the size and the style,
but if the text is right justified the right edge might move by as many as
20-40 pixels per line and  the text will be clipped out of the page or not
justified.

When I use layout.draw the measurement is correct. Text draws where it needs
to etc, however, the text looks very 'jaggy', as if it is drawn for a 36 DPI
screen. The resolution is there, and if you zoom into the file you see that
the resolution is there. Even more, it prints okay. This is just a screen
problem.

I am sure this is not an iText problem but a Java problem, as it happens to
me when I use other print drivers to generate the PDF.

Does anyone have trick how to make the text drawn with layout.draw look nice
on the screen as well (or to make drawString measure correctly)? If I would
like to use the PDF as a proof, it should look as it will print.

Thanks

-Yishai Steinhart



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to