[ https://issues.apache.org/jira/browse/FOP-3141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17750385#comment-17750385 ]
Jan Tošovský commented on FOP-3141: ----------------------------------- I made some experiments and found the behavior of "fixed" is driven by deliberate breaking out of the viewport in [IFRenderer|https://github.com/apache/xmlgraphics-fop/blob/main/fop-core/src/main/java/org/apache/fop/render/intermediate/IFRenderer.java]: {code:java} //For FIXED, we need to break out of the current viewports to the //one established by the page. We save the state stack for restoration //after the block-container has been painted. See below. List breakOutList = null; if (bv.getPositioning() == Block.FIXED) { breakOutList = breakOutOfStateStack(); } AffineTransform positionTransform = new AffineTransform(); positionTransform.translate(bv.getXOffset(), bv.getYOffset()); {code} {{bv.getYOffset()}} stores the desired "top" coordinate but that transformation is not applied by that breakage. This handling is suspicious. > <fo:block-container absolute-position="fixed"> - auto-calculating top/left > positions based on bottom/right when height/width is provided > ---------------------------------------------------------------------------------------------------------------------------------------- > > Key: FOP-3141 > URL: https://issues.apache.org/jira/browse/FOP-3141 > Project: FOP > Issue Type: Improvement > Components: layout/block > Affects Versions: 2.8 > Reporter: Jan Tošovský > Priority: Minor > Attachments: bottom.fo, bottom_absolute_fop.pdf, > bottom_absolute_xep.pdf, bottom_auto_fop.pdf, bottom_auto_xep.pdf, > bottom_current.pdf, bottom_expected.pdf, bottom_fixed_fop.pdf, > bottom_fixed_xep.pdf > > > When the block container is to be placed on the bottom edge, it is necessary > to specify the top position even if the bottom and height attributes are > specified (so the top position could be auto-calculated). > I actually try generating some FO files originally designed for XEP, but for > FOP I have to tweak all these top positions. It is straightforward, but I am > losing the original semantics (top="18.8cm" instead of more clear bottom="0"). > I could locate the possible place for tweaking: > [https://github.com/apache/xmlgraphics-fop/blob/main/fop-core/src/main/java/org/apache/fop/fo/properties/CommonRelativePosition.java] > In the constructor, if the top is zero, but both the bottom and the height > are non-zero, the top could be calculated. Same for the left and right + > width). -- This message was sent by Atlassian Jira (v8.20.10#820010)