• Post Reply Bookmark Topic Watch Topic
  • New Topic

Printing text and image-with-text

 
Ko Wey
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody, here is a question for the lovely staff/customers of this exellent saloon...

If I print text I get a nice result on paper; if I print the same text+ same font on a (Buffered)Image and then print this image, the quality of the fonts is just awfull! Any idea how I can counter this?

here is a test-program to show what I mean: compile and run (printer ready?)

 
dave taubler
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've had the same experience. I think the simple answer is that Java is rendering your text/font as it writes it to the BufferedImage, and the target resolution of that BufferedImage is 72dpi. So essentially, you are creating an image whose destination is the screen (hence it's written at screen resolution.) Once you have created that image, you are then trying to print it, but at that point it doesn't have enough information to look good on a, say, 300 dpi printer.

Hopefully that makes sense, although I doubt it actually solves your problem.

I ran into that problem myself when I was creating multi-page reports, and was trying to cache them as images before printing them. That didn't work; I basically had to render each page as I was printing it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!