xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Lindeboom <michael.lindeb...@bms.com>
Subject Looking for PDF selectable text from PDFTranscoder
Date Wed, 21 Dec 2005 20:56:17 GMT
I am testing the PDFTranscoder. I see through he following example 
(http://xmlgraphics.apache.org/fop/dev/svg/text.pdf) that the text is 
selectable in some cases. Is there a transcoder setting that is required 
to generate selectable text in the resulting PDF document?

So far the SVG content that I have tried to transform to PDF does not 
have selectable text. Note: My examples also have some unicode for 
chinese characters.

My code is below.

        InputStream ins = new 
ByteArrayInputStream(svglabel.renderLabelContent().getBytes());
        PDFTranscoder t = new PDFTranscoder();
        t.addTranscodingHint(PDFTranscoder.KEY_EXECUTE_ONLOAD, new 
Boolean(true));
        t.addTranscodingHint(PDFTranscoder.KEY_STROKE_TEXT, new 
Boolean(true));
        TranscoderInput input = new TranscoderInput(ins);
        OutputStream ostream = new FileOutputStream(svgFile.getFile());
        TranscoderOutput output = new TranscoderOutput(ostream);
        t.transcode(input, output);
        ostream.flush();
        ostream.close();


Michael

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


Mime
View raw message