Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Force small line width/spacing in PDF output
YairLenga
Hi,
I'm working on a report that will be used in multiple locales. The report is presenting the user with lot of financial indicators - space is very limited.
The short version of my question: Is it possible to reduce the spacing between text items in PDF output by using less than 100% line width ?
The long version:
We have noticed that we can get ~15% more lines using Helvetica fonts, vs the ArialUni fonts (using the same font size). After analysis of the report, we realize that a lot of space is kept above and below any test in the ARIALUNI fonts. It looks as the ARIALUNI fonts declare a bounding box that is larger than the bounding box defined for Helvetica (or even Arial) font of the same size. I suspect that this is done because the bounding box is caculated to fit many detailed symbols in non-latin locales (that I do not need).
On HTML output, the solution is easy - one can set the "Line Height", and "Line Spacing" to whatever value (including negative, absolute value). The browser (and the viewer) will obey those numbers, even if it result in partial/complete overlap. Using a value of 85-90% can be used to eliminate the wasted while space around text in ARIALUNI, while still making the report usable.
Unfortunately, this is not working with PDF-based emitters (including Postscript). The code seems to calculate "minimum height" bounding box for every text field. It will then use the line height and line width to increase the spacing between lines. It refused to use anything below the "bounding box".
My Question:
- Does anyone know how much effort it is to modify the PDF emitter (actually, it's the layout engine that is used to position text) - to remove this constraint. It will be nice to support arbitrary spacing between lines (which will allow more efficient use of page space).
If this is not possible (or desirable) to allow text overlap, is it possible to calculate the bounding box of the text based on a user-provided character subset (e.g., calculate the bbox based on the actual character set, or allow the template to specify the characters that will be used in a specific report).
- Alternatively, is there a way to modify the TTF file, or to somehow configure the itext engine to use different values for the text bounding box (instead of the one provided in the TTF file) ?
The problem is even compounded by the "simulated Bold" (see my post regarding "Bold ArialUni font").
Regards,
Yair
Find more posts tagged with
Comments
gliu
This is a bug of BIRT, currently PDF emitter can not support line-height little than 100%. Please refer to <a class='bbc_url' href='
https://bugs.eclipse.org/bugs/show_bug.cgi?id=276045'>https://bugs.eclipse.org/bugs/show_bug.cgi?id=276045</a>
;