zhihongzzh / flying-saucer

Automatically exported from code.google.com/p/flying-saucer
0 stars 0 forks source link

Html to Image quality is different on Windows and RHEL5.0 #168

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create an html with lots of text. Preferably a table with tags like TH, TD 
with some some text in bold and others normal. Use CSS to define this styles 
and use font-family Arial.
2. Generate an image based on this html on Windows machine, and generate image 
using same html on RHEL5.0. As Arial is Microsoft Windows TrueTypeFont, you may 
have to install these fonts on RHEL 5.0
3. The texts in images from these machines are considerably different.

What is the expected output? What do you see instead?
The output of image should be equally clear. Both images should be as clear as 
seeing the html in internet browser.

Please find image and html files attached with this email. Pay attention toward 
letter A, y, M, W and number 4, 2. File SystemASCapMonWindowsOutput.png is from 
Windows machine and File SystemASCapMonRHELOutput.png is from RHEL5.0.

The two images are blurry, especially the one generated on Linux.

What version of the product are you using? On what operating system?
Using flying-saucer R8 on Windows XP and Linux RHEL 5.0 with JDK6

Please provide any additional information below.
I have tried using rendering hints with Java2DRenderer. The hints I am adding 
are 

hints.put(RenderingHints.KEY_TEXT_ANTIALIASING, 
RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB);
        hints.put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
        hints.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);

Original issue reported on code.google.com by dti...@ercot.com on 17 Aug 2011 at 6:38

Attachments:

GoogleCodeExporter commented 8 years ago
Flyingsaucer uses Java2D to render fonts, so this is probably a difference in 
Java2D implementation between platforms. Have you tried to render some fonts 
with Java2D and compare results?

Original comment by rustam...@gmail.com on 14 Apr 2014 at 9:15