birt icon indicating copy to clipboard operation
birt copied to clipboard

PDF emitter: default value for padding-right is not used

Open hvbtup opened this issue 10 months ago • 1 comments

While working on https://github.com/eclipse-birt/birt/pull/2060, I noticed that the PDF emitter seems to use 0pt as the default for padding-right, however the UI says 1pt is the default.

This can be seen in the output of the report I attached to #2060 :

Image

Only when I explicitly set padding-right to 1pt, there is a visible padding, see the last two labels with a yellow mark.

hvbtup avatar Feb 25 '25 11:02 hvbtup

This seems quite complicated. I don't really understand how all the properties work.

When I worked on PDF/UA support, it was "simple", and the default values defined in rom.def where actually used. But the box properties seem to work differently.

The rom.def states that the default value for padding (on all four sides) is 1pt.

But as far as I can see in the code, this isn't really the default, and the actual default seems to be 0 instead.

Note that the style editor suffers from a similar problem (also states that 1pt is the default).

I'm not sure if changing this would be a good idea, even though the current behaviour is somewhat broken.

It's probably better to let the report designers decide explicitly for their reports if and how much padding should be applied.

hvbtup avatar Feb 25 '25 13:02 hvbtup