Stefan Ziegler created BATIK-1381:
-------------------------------------

             Summary: Text not displayed if opacity is not 1
                 Key: BATIK-1381
                 URL: https://issues.apache.org/jira/browse/BATIK-1381
             Project: Batik
          Issue Type: Bug
    Affects Versions: 1.18
            Reporter: Stefan Ziegler
         Attachments: test.svg

Attached is a simple SVG file containing a text tag that has opacity: 0.5. This 
SVG file is converted to PDF. The resulting PDF does not display the text. If I 
change opacity to 1, then the text in the PDF file is visible. Any ideas?
 
{code:java}
File svgFile = new File("test.svg");
File pdfFile = new File("test.pdf");

InputStream fin = new BufferedInputStream(new FileInputStream(svgFile));
OutputStream fout = new BufferedOutputStream(new FileOutputStream(pdfFile));

TranscoderInput input = new TranscoderInput(fin);
TranscoderOutput output = new TranscoderOutput(fout);

PDFTranscoder transcoder = new PDFTranscoder() {
    protected Configuration getEffectiveConfiguration() {                 --
       DefaultConfiguration cfg = new DefaultConfiguration("cfg");              
 
       DefaultConfiguration fonts = new DefaultConfiguration("fonts");          
       DefaultConfiguration autodetect = new 
DefaultConfiguration("auto-detect");               
       fonts.addChild(autodetect);
       cfg.addChild(fonts);
       return cfg;
    }
};
transcoder.transcode(input, output);{code}
 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-h...@xmlgraphics.apache.org

Reply via email to