Skip to content

Commit

Permalink
Enhance of SVG-converting for PDF based on external resources (#1841)
Browse files Browse the repository at this point in the history
  • Loading branch information
speckyspooky authored and merks committed Aug 17, 2024
1 parent 0836e29 commit 0f2ccf2
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 0f2ccf2

Please sign in to comment.