ZVON
>
References
>
Zvon Example Repository
Intro
/
Search
/
ZVON
Example repository:
index
|
categories
|
search
All
>
XSL FO
>
SVG
> Embedding SVG in XSL FO
|
PDF document
Include SVG objects using the element
instream-foreign-object
. Another possibility is to first rasterize the SVG and then include the bitmap image in XSL FO .
Source
<
fo:root
xmlns:fo="
http://www.w3.org/1999/XSL/Format
" >
<
fo:layout-master-set
>
<
fo:simple-page-master
master-name
="simple">
<
fo:region-body
/>
</
fo:simple-page-master
>
</
fo:layout-master-set
>
<
fo:page-sequence
master-reference
="simple">
<
fo:flow
flow-name
="xsl-region-body">
<
fo:block
>
<
fo:instream-foreign-object
>
<
svg:svg
width
="100pt"
height
="100pt" xmlns:svg="
http://www.w3.org/2000/svg
" >
<
svg:circle
cx
="50pt"
cy
="50pt"
r
="30pt"
style
="
fill
:blue;"/>
</
svg:svg
>
</
fo:instream-foreign-object
>
</
fo:block
>
</
fo:flow
>
</
fo:page-sequence
>
</
fo:root
>