[ https://issues.apache.org/jira/browse/FOP-1333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vincent Hennebert closed FOP-1333. ---------------------------------- Resolution: Not A Problem The two overflow messages can be explained: * Regarding the region-before: height doesn't apply on fo:block, so it is just ignored. A value of 100% on the external-graphics means that it takes its height from the parent element (the fo:block). But since the size of that latter depends on its content, the value is interpreted as "auto" (see Section 7.15.6, "height", from XSL-FO 1.1). On an external-graphic, a value of "auto" for height means that the intrinsic size of the graphic is used (see Section 6.6.5, "fo:external-graphic", from XSL-FO 1.1). Basically, you cannot use percentages to specify the height of an image. You have to put the size explicitly (from which you have subtracted the border widths). * Regarding region-body: The height of 100% set on the block-container specifies its /content/ height: just the content, without the padding nor the border. But since you specified a border of 0.25mm, that doesn't fit in the page. Set the height to "100% - 0.5mm" and the overflow error disappears. Vincent > External graphic doesnt size properly with height set at 100% > ------------------------------------------------------------- > > Key: FOP-1333 > URL: https://issues.apache.org/jira/browse/FOP-1333 > Project: Fop > Issue Type: Bug > Components: general > Affects Versions: 0.93 > Environment: Operating System: other > Platform: PC > Reporter: Barry Pearce > Attachments: logo.jpg, test.pdf > > > The following XSL-FO causes a complaint about the graphics being out of limits > and DOES NOT render at the scaled size. The specification states that a height > of 100% should cause the area to be set at the same size of the parent (which > should be the size of extent in this case. > <?xml version="1.0" encoding="utf-8"?> > <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> > <fo:layout-master-set> > <fo:simple-page-master master-name="Form" > page-width="210mm" page-height="297mm" > margin-top="10mm" margin-bottom="10mm" > margin-left="10mm" margin-right="10mm" > padding="0"> > <fo:region-body > margin="0" margin-top="32mm" padding="0"/> > <fo:region-before extent="32mm" > margin="0" padding="0"/> > </fo:simple-page-master> > </fo:layout-master-set> > > <fo:page-sequence master-reference="Form"> > <fo:static-content flow-name="xsl-region-before"> > <fo:block text-align="center" > height="100%" width="100%" > border-style="solid" > border-color="orange" border-width="0.25mm"> > <fo:external-graphic > border-style="solid" > border-color="black" border-width="0.25mm" > scaling="uniform" > scaling-method="resample-any-method" > height="100%" > content-height="scale-to-fit" > src="logo.jpg" > /> > </fo:block> > </fo:static-content> > <fo:flow flow-name="xsl-region-body"> > <fo:block-container > height="100%" width="100%" > border-style="solid" > border-color="blue" border-width="0.25mm"> > <fo:block text-align="center" font-size="20pt" > font-family="serif" > line-height="30pt"> > LOGO CHECK > </fo:block> > </fo:block-container> > </fo:flow> > </fo:page-sequence> > > </fo:root> -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira