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 Willy Reinhardt <wr...@novell.com> on 2005/05/03 11:28:07 UTC
Rép. : SVG positionning problem
The problem seems to be related to a difference of FOP processing between
tag <fo:instream-foreign-object> and tag <fo:external-graphic sr="..."/>
because if I include the svg by using external-graphics it work correctly.
Any idea why rendering is different ?
Willy
-----------------------------------
Cambridge Technology and Partners
Willy Reinhardt
Air Center
Ch. des coquelicots 16
CH-1214 Vernier
Phone: +41 22 306 47 24
Fax: +41 22 306 47 47
http://www.ctp.com
>>> wreinhardt@novell.com 02/05/05 19:12 >>>
Hi,
I would generate an unordered list with different graphics for each level. To create graphics I use <fo:instream-foreign-object> with svg tags inside.
result is:
<fo:list-item>
<fo:list-item-label end-indent="label-end()">
<fo:block>
<fo:instream-foreign-object>
<svg:svg width="10pt" height="10pt">
<svg:g style="stroke:black; stroke-width:1">
<svg:circle style="fill:white" cx="5pt" cy="5pt" r="2pt" />
</svg:g>
</svg:svg>
</fo:instream-foreign-object>
</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>Niveau 2 puce 2</fo:block>
</fo:list-item-body>
</fo:list-item>
For the first level the positionning is correct for each next level the graphic is shifted to the right and overlap the text.
If I replace the <fo:instream-foreign-object> with <fo:external-graphic sr="..."/> the source image (jpeg) has been generated from svg tags the positionning is correct.
Have you any idea why an svg graphics isn't positionned as a bitmap graphic ?
Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Rép. : SVG positionning problem
Posted by Mike Trotman <mi...@datalucid.com>.
I think I encountered this problem last year.
I don't clearly remember the solution - but I think adding the viewBox
dimensions to the svg:svg definitely helped.
This clearly specifies which part of the SVG you want to display - and
stops FOP having to resolve two possibly different sizes.
Maybe FOP has some calculation (or cacheing?) of default viewBox size?
Mike
Willy Reinhardt wrote:
>The problem seems to be related to a difference of FOP processing between
>tag <fo:instream-foreign-object> and tag <fo:external-graphic sr="..."/>
>because if I include the svg by using external-graphics it work correctly.
>
>Any idea why rendering is different ?
>
>Willy
>
>
>
>-----------------------------------
>Cambridge Technology and Partners
>Willy Reinhardt
>Air Center
>Ch. des coquelicots 16
>CH-1214 Vernier
>Phone: +41 22 306 47 24
>Fax: +41 22 306 47 47
>http://www.ctp.com
>
>
>>>>wreinhardt@novell.com 02/05/05 19:12 >>>
>>>>
>>>>
>Hi,
>
>I would generate an unordered list with different graphics for each level. To create graphics I use <fo:instream-foreign-object> with svg tags inside.
>
>result is:
>
><fo:list-item>
> <fo:list-item-label end-indent="label-end()">
> <fo:block>
> <fo:instream-foreign-object>
> <svg:svg width="10pt" height="10pt">
> <svg:g style="stroke:black; stroke-width:1">
> <svg:circle style="fill:white" cx="5pt" cy="5pt" r="2pt" />
> </svg:g>
> </svg:svg>
> </fo:instream-foreign-object>
> </fo:block>
> </fo:list-item-label>
> <fo:list-item-body start-indent="body-start()">
> <fo:block>Niveau 2 puce 2</fo:block>
> </fo:list-item-body>
></fo:list-item>
>
>For the first level the positionning is correct for each next level the graphic is shifted to the right and overlap the text.
>
>If I replace the <fo:instream-foreign-object> with <fo:external-graphic sr="..."/> the source image (jpeg) has been generated from svg tags the positionning is correct.
>
>Have you any idea why an svg graphics isn't positionned as a bitmap graphic ?
>
>Thanks
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
>
>
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.11.2 - Release Date: 02/05/2005
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org