I noticed a strange behaviour concerning margins that could be related to the inheritance of start-indend and end-indent, which was discussed a few weeks ago. It seems that in some situations the margins are subtracted twice from the available inline progression dimension.
In the little fo file I'm attaching there are two simple-page-masters: - in one of them, left and right margins are set inside simple-page-master itself - in the other, they are set inside region-body In both cases, the page width is 200 points, with left and right margin set to 50 points; so, the line width should be 100 points. In the method PageSequenceLayoutManager.getViewportRectangle(), the computed ipd is right when the margins are set in region-body, but it is 0 if they are set in simple-page-master, because relDims.ipd is already 100 and start- end-indent are 50. As this method has not been modified recently, the error (if this behaviour is really wrong) must be elsewhere ... Regards, Luca
<?xml version="1.0" encoding="UTF-8"?> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> <fo:layout-master-set> <fo:simple-page-master master-name="marginsInMaster" page-height="800pt" page-width="200pt" margin-top="60pt" margin-bottom="60pt" margin-left="50pt" margin-right="50pt"> <fo:region-body/> </fo:simple-page-master> <fo:simple-page-master master-name="marginsInRegion" page-height="800pt" page-width="200pt" margin-top="60pt" margin-bottom="60pt"> <fo:region-body margin-left="50pt" margin-right="50pt"/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="marginsInMaster" hyphenate="true" language="it" text-align="justify"> <fo:flow flow-name="xsl-region-body"> <fo:block background-color="pink" font-size="16pt" font-weight="bold" space-after="5mm">corto piccolo mini super qualcosa corto qui e qui precipitevolissimevolmente e poi ancora bla bla bla e ancora qualche parola.</fo:block> </fo:flow> </fo:page-sequence> <fo:page-sequence master-reference="marginsInRegion" hyphenate="true" language="it" text-align="justify"> <fo:flow flow-name="xsl-region-body"> <fo:block background-color="pink" font-size="16pt" font-weight="bold" space-after="5mm">corto piccolo mini super qualcosa corto qui e qui precipitevolissimevolmente e poi ancora bla bla bla e ancora qualche parola.</fo:block> </fo:flow> </fo:page-sequence> </fo:root>