From 0f2ccf2f4d2459bee1fd23fc06c2cc8601680954 Mon Sep 17 00:00:00 2001 From: Thomas Gutmann Date: Fri, 16 Aug 2024 23:35:25 +0200 Subject: [PATCH] Enhance of SVG-converting for PDF based on external resources (#1841) --- .../src/org/eclipse/birt/report/engine/emitter/pdf/PDFPage.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/engine/org.eclipse.birt.report.engine.emitter.pdf/src/org/eclipse/birt/report/engine/emitter/pdf/PDFPage.java b/engine/org.eclipse.birt.report.engine.emitter.pdf/src/org/eclipse/birt/report/engine/emitter/pdf/PDFPage.java index e2d2d93ffa..275435287d 100644 --- a/engine/org.eclipse.birt.report.engine.emitter.pdf/src/org/eclipse/birt/report/engine/emitter/pdf/PDFPage.java +++ b/engine/org.eclipse.birt.report.engine.emitter.pdf/src/org/eclipse/birt/report/engine/emitter/pdf/PDFPage.java @@ -27,6 +27,7 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; +import org.apache.batik.transcoder.SVGAbstractTranscoder; import org.apache.batik.transcoder.TranscoderInput; import org.apache.batik.transcoder.print.PrintTranscoder; import org.eclipse.birt.report.engine.content.IHyperlinkAction; @@ -682,6 +683,7 @@ protected PdfTemplate transSVG(String svgPath, byte[] svgData, float height, flo } else if (null != svgPath) { transcoder.transcode(new TranscoderInput(svgPath), null); } + transcoder.addTranscodingHint(SVGAbstractTranscoder.KEY_ALLOW_EXTERNAL_RESOURCES, Boolean.TRUE); PageFormat pg = new PageFormat(); Paper p = new Paper(); p.setSize(width, height);