jbuberel Posted November 22, 2006 Share Posted November 22, 2006 Hello there- Looking for some advice on how to further troubleshoot some layout sizing/spacing differences that I am experiencing when generating the same report on two different Linux servers. The generation code, jrxml, and input data are all identical. The JavaVM used when exporting to PDF is the same (bea-jdk, but the problem is seen on sun and ibm jdks as well). Server 1: RedHat Enterprise Server v3.0 (XFree86)Server 2: RedHat Enterprise Server v4.0 (x.org) I have verified that the problem is not caused by font substitution differences. I did this by replacing the font (currently Arial) temporarily with a TTF that is definitely not provided by the X11 server on either machine (Gentium). The results were always the same. Here is what the 'correct' version should look like (note the words 'market update' on the title line):http://www.altosresearch.com/sample.pdf Here is the 'incorrect' version, note that the title line is missing the word 'update':http://www.altosresearch.com/sample2.pdf When opening the raw PDF data, I can see (after the normal preamble portions) some very minor differences in the dimensions of some regions: Correct:Code:7 0 obj<</Border[0 0 0]/Rect[295 78.37 379.88 86.37]/Subtype/Link/C[0 0 1]/A<</S/URI/URI(http://www.altosresearch.com)>>>> Incorrect:Code:[code]7 0 obj<</Border[0 0 0]/Rect[295 78.4 379.88 86.4]/Subtype/Link/C[0 0 1]/A<</S/URI/URI(http://www.altosresearch.com)>>>> One guess is that this had something to do with the DPI difference between the two X11 servers running on each machine. Note, however, that I am using the 'headless' jvm argument, so I didn't think that would make any difference. Any suggestions on where I should look next? Regards,jasonPost edited by: jbuberel, at: 2006/11/22 05:34 Link to comment Share on other sites More sharing options...
lucianc Posted November 22, 2006 Share Posted November 22, 2006 Did you also check that the Java fonts used in your report (fontName JRXML attribute) resolves to the same fonts as the ones used for PDF exporting (pdfFontName JRXML attribute)? While filling a report, text layout is determined using AWT, and if the metrics of the AWT font don't match the metrics of the PDF font, unexpected PDF output may occur. Regards,Lucian Link to comment Share on other sites More sharing options...
jbuberel Posted November 23, 2006 Author Share Posted November 23, 2006 Thank you for the tip - we had assumed that the font names inside our 'arial.ttf' file (from the MSTT Core Fonts Distribution) were simply named 'Arial', but we were wrong. I used the open source 'FontForge' tool to open the TTF files only to discover that the actual font name is 'Arial-MT'. Regards,jason Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now