Win a copy of Programmers Guide to Apache Thrift this week in the Open Source forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Fuzzy printing when using PrinterJob to print Canvas  RSS feed

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have some applications in Java Swing that display and print custom charts, and I am converting some of the applications to JavaFX. I am using Java 8 version 1.8.0_201, downloaded from Oracle, running on Windows 10.

For a user GUI, I am finding FX a bit easier to use Swing, despite the effort of having to learn something new.

However, I am finding that the FX printed output is very fuzzy or blurry, compared to the crisp and sharp printed output that I get with Swing. (The problem is with printed output – FX screen displays are sharp.)  For comparison, I have sample applications in both Swing and FX that print a single big “X” on the page with “Hello Universe” at the center, and a vertical line with tick marks just to the left of center. I printed the results to PDF files and have displayed (using Adobe Acrobat Reader) the center parts of the Swing and FX results below. Note how fuzzy the FX output is. (Swing to left, FX to right.)

   

I’ve attached the code for an FX test case. Run it, select a printer ("Select printer" button), and then print the test page ("Print" button). Printing to a real printer or to a PDF file both result in fuzzy output.

Any ideas?

   

 
Mark Wayne
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmmm.. the Swing sample is on the top, the FX sample is on the bottom.
 
Evil is afoot. But this tiny ad is just an ad:
ScroogeXHTML - small and flexible RTF to HTML converter library
https://coderanch.com/t/710903/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!