You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by "Stefan Ziegler (Jira)" <ji...@apache.org> on 2025/04/07 15:29:00 UTC
[jira] [Updated] (BATIK-1381) Text not displayed if opacity is not 1
[ https://issues.apache.org/jira/browse/BATIK-1381?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stefan Ziegler updated BATIK-1381:
----------------------------------
Attachment: test.pdf
> 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
> Priority: Major
> Attachments: test.pdf, 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-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org