[prev in list] [next in list] [prev in thread] [next in thread] 

List:       batik-users
Subject:    xlink:href in pdf from svg source?
From:       Jared Davis <sunray () davisprogramming ! com>
Date:       2013-06-24 19:09:42
Message-ID: loom.20130624T210349-540 () post ! gmane ! org
[Download RAW message or body]

Hi,

I can not generate a pdf from svg that contains an external link on the
text.  Should it work? Where should I look?

The output pdf file contains the text but no link to google.

svg:

<?xml version="1.0" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" viewBox="0 0 612
792" height="792pt" width="612pt" ><g transform="translate(36,36)">

<a xlink:href="http://www.google.com">
<text x="0" y="0.0" >Test Text with Link</text>
</a></g></svg> 



Code:

        org.apache.fop.svg.PDFTranscoder t = new
org.apache.fop.svg.PDFTranscoder();
        t.addTranscodingHint(PDFTranscoder.KEY_AUTO_FONTS, Boolean.FALSE);

        TranscoderInput input = new TranscoderInput(new StringReader(svg));
        File out = File.createTempFile("svg", ".pdf", dir);
        OutputStream ostream = new FileOutputStream(out);
        TranscoderOutput output = new TranscoderOutput(ostream);
        t.transcode(input, output);
        ostream.close();




---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic