You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by "Rea, Matthew" <Ma...@auspost.com.au> on 2004/07/06 08:52:11 UTC

instream-foreign-object vertical alignment

Hello,
 
I have a fo:instream-foreign-object that contains some SVG to draw a few
lines.  This is placed in a table cell inside a block and I want to
horizontally align to the left side and vertically align to the bottom of
the cell.  
 
The following XSL-FO "nearly" works:
 
<fo:table-cell border-style="solid" border-width="0.1mm" border-color="blue"
display-align="after">
<fo:block text-align="left" vertical-align="bottom">
<fo:instream-foreign-object>
 
        <!-SVG content -->
 
</fo:instream-foreign-object>
</fo:block>
<fo:table-cell>
 
The horizontal alignment works great but the vertical alignment only
partially works.... or rather it doesn't work exactly the way I want it to.
The problem is the vertical align does not align the SVG right to the bottom
of the cell like I really need.  The table row the cell is in is 16mm high
and the svg is consistently vertically aligned to approximately 0.5mm from
the bottom of the cell.  The same thing happens if I try and vertically
align to the top of the cell.  I want the SVG to be sitting right against
the table border which works fine horizontally, just not vertically.
 
Any ideas on how to get this working? 
 
I using FOP 0.20.5 on WinXP.
 
 
Thanks in advance,
 
Matthew Rea
 
 


Australia Post is committed to providing our customers with excellent service. If we can assist you in any way please telephone 13 13 18 or visit our website www.auspost.com.au.

CAUTION

This e-mail and any files transmitted with it are privileged and confidential information intended for the use of the addressee. The confidentiality and/or privilege in this e-mail is not waived, lost or destroyed if it has been transmitted to you in error. If you have received this e-mail in error you must (a) not disseminate, copy or take any action in reliance on it; (b) please notify Australia Post immediately by return e-mail to the sender; and (c) please delete the original e-mail.

Re: instream-foreign-object vertical alignment

Posted by Chris Bowditch <bo...@hotmail.com>.
Chris Bowditch wrote:

> Rea, Matthew wrote:
> 
> <snip/>
> 
>> The horizontal alignment works great but the vertical alignment only 
>> partially works.... or rather it doesn't work exactly the way I want 
>> it to.   The problem is the vertical align does not align the SVG 
>> right to the bottom of the cell like I really need.  The table row the 
>> cell is in is 16mm high and the svg is consistently vertically aligned 
>> to approximately 0.5mm from the bottom of the cell.  The same thing 
>> happens if I try and vertically align to the top of the cell.  I want 
>> the SVG to be sitting right against the table border which works fine 
>> horizontally, just not vertically.
> 
> 
> No doubt this 0.5mm is space reserved for borders on the cell. You can 
> try specifying a negative value for padding-margin ?? If that fails, 
> perhaps a negative margin-bottom??

Ooppss, a typo. I meant padding-bottom !!

Chris



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: instream-foreign-object vertical alignment

Posted by Chris Bowditch <bo...@hotmail.com>.
Rea, Matthew wrote:

<snip/>

> The horizontal alignment works great but the vertical alignment only 
> partially works.... or rather it doesn't work exactly the way I want it 
> to.   The problem is the vertical align does not align the SVG right to 
> the bottom of the cell like I really need.  The table row the cell is in 
> is 16mm high and the svg is consistently vertically aligned to 
> approximately 0.5mm from the bottom of the cell.  The same thing happens 
> if I try and vertically align to the top of the cell.  I want the SVG to 
> be sitting right against the table border which works fine horizontally, 
> just not vertically.

No doubt this 0.5mm is space reserved for borders on the cell. You can try 
specifying a negative value for padding-margin ?? If that fails, perhaps a 
negative margin-bottom??

Chris



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org