Padding when displaying two blocks side by side

Arthur Derewjankin <[email protected]>
Newsgroups gmane.text.xml.fop.user
Message-ID <[email protected]>
Hi,

I have the problem that I get a small padding when I want to display two blocks side by side. 
I have created a small example to show you what I exactly mean.

<?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="page" page-height="297mm" page-width="210mm" margin="0">
				<fo:region-body region-name="xsl-region-body" margin="20mm 19mm"/>
				<fo:region-before region-name="xsl-region-before" extent="20mm"/>
			</fo:simple-page-master>
		</fo:layout-master-set>
		<fo:page-sequence master-reference="page">
			<fo:static-content flow-name="xsl-region-before">
				<fo:block background-color="red" font-size="10pt">
					<fo:inline-container inline-progression-dimension="105mm">
						<fo:block>
							Text left
						</fo:block>
					</fo:inline-container>
					<fo:inline-container inline-progression-dimension="105mm">
						<fo:block text-align="right" background-color="yellow">
							Text right
						</fo:block>
					</fo:inline-container>
				</fo:block>
			</fo:static-content>
			<fo:flow flow-name="xsl-region-body">
				<fo:block/>
			</fo:flow>
		</fo:page-sequence>
	</fo:root>
	
This example leads to testOutput1.pdf.

After some research I found this post (http://apache-fop.1065347.n5.nabble.com/Eliminating-block-s-padding-around-an-external-graphic-td39020.html) 
and I was able to "fix" it. The implementation now looks like this:

<?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="page" page-height="297mm" page-width="210mm" margin="0">
				<fo:region-body region-name="xsl-region-body" margin="20mm 19mm"/>
				<fo:region-before region-name="xsl-region-before" extent="20mm"/>
			</fo:simple-page-master>
		</fo:layout-master-set>
		<fo:page-sequence master-reference="page">
			<fo:static-content flow-name="xsl-region-before">
				<fo:block background-color="red" font-size="0"> <!-- here I have set the font-size -->
					<fo:inline-container inline-progression-dimension="105mm">
						<fo:block font-size="10pt"> <!-- here I have set the font-size -->
							Text left
						</fo:block>
					</fo:inline-container>
					<fo:inline-container inline-progression-dimension="105mm">
						<fo:block text-align="right" background-color="yellow" font-size="10pt"> <!-- here I have set the font-size -->
							Text right
						</fo:block>
					</fo:inline-container>
				</fo:block>
			</fo:static-content>
			<fo:flow flow-name="xsl-region-body">
				<fo:block/>
			</fo:flow>
		</fo:page-sequence>
	</fo:root>

This example leads to testOutput2.pdf.

As you can see it does what I want. But to set the font-size for every block is more a "hack" than a proper solution. 
I have also tried to set a padding of -1 which works but this feels like a hack aswell. In my opinion this can't be the final solution. 
Any ideas?


Thanks,

Arthur


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
test1.fo (application/octet-stream, 1 KB) - not displayed
test2.fo (application/octet-stream, 1.1 KB) - not displayed
testOutput1.pdf (application/pdf, 5.1 KB) - not displayed
testOutput2.pdf (application/pdf, 5.1 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.