xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jared Davis <sun...@davisprogramming.com>
Subject xlink:href in pdf from svg source?
Date Mon, 24 Jun 2013 19:09:42 GMT

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.


<?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>


        org.apache.fop.svg.PDFTranscoder t = new
        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);

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

View raw message