I have SVG working in FOP, and it works great (except some minor issues,
which is out of scope of this mail here). And I didnt post the complete svg
code in my previous mail.
Here it is what I was trying to achieve. Each rect in this svg image would
point to a different bookmark in the same PDF document (as shown in comments
in the svg code).
!-- SVG code = --
fo:block xmlns:fo=http://www.w3.org/1999/XSL/Format;
fo:instream-foreign-object xmlns:svg=http://www.w3.org/2000/svg;
svg:svg width=600 height=400
svg:rect x=20 y=20 width=100 height=200
style=stroke:rgb(0,0,0);stroke-width:1/
!-- This RECT links to book mark - 1 --
svg:rect x=15 y=30 width=110 height=50
style=stroke:rgb(0,0,0);stroke-width:1;fill:rgb(60,237,248)/
!-- This RECT links to book mark - 2 --
svg:rect x=15 y=90 width=110 height=50
style=stroke:rgb(0,0,0);stroke-width:1;fill:rgb(60,237,248)/
!-- This RECT links to book mark - 3 --
svg:rect x=15 y=150 width=110 height=50
style=stroke:rgb(0,0,0);stroke-width:1;fill:rgb(60,237,248)/
svg:text x=75 y=50
style=fill:rgb(0,0,0);font-size:10;font-family:Andale MonoLTUE/svg:text
/svg:svg
/fo:instream-foreign-object
/fo:block
Now, is there any way I can provide links (either external or internal) to
an SVG image inside a pdf document.
Thanks,
Saif.
From: Joerg Pietschmann [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: FOP User [EMAIL PROTECTED]
Subject: Re: fo:basic-link on svg image
Date: Fri, 22 Mar 2002 11:09:21 +0100
Saif Khaja [EMAIL PROTECTED] wrote:
fo:basic-link internal-destination=mark1
svg:rect x=100 y=100 width=100 height=200/
fo:basic-link
If you want to embed SVG data into a FO document, you have
to use a fo:instream-foreign-object.
Furthermore, i vaguely remember that you need a top level
svg:svg element.
Therefore, try:
fo:instream-foreign-object
svg:svg width=10mm height=20mm viewBox=0 0 101 201
svg:rect x=0 y=0 width=100 height=200/
/svg:svg
/fo:instream-foreign-object
I think it would be a good idea to try the embedded SVG
code in a SVG viewer first in order to see whether it works
and embed it only after you got it working. It may still be
tricky to manage the window/viewport issues, documentation
is very scarce.
Assistance to get your SVG working is more likely to be found
on other lists. If you use Batik as standalone viewer, you
could try batik-user.
J.Pietschmann
_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.