Search in sources :

Example 1 with PDFTranscoder

use of org.apache.fop.svg.PDFTranscoder in project dhis2-core by dhis2.

the class SvgConversionController method convertToPdf.

private void convertToPdf(String svg, OutputStream out) throws TranscoderException {
    svg = replaceUnsafeSvgText(svg);
    PDFTranscoder transcoder = new PDFTranscoder();
    TranscoderInput input = new TranscoderInput(new StringReader(svg));
    TranscoderOutput output = new TranscoderOutput(out);
    transcoder.transcode(input, output);
}
Also used : TranscoderOutput(org.apache.batik.transcoder.TranscoderOutput) TranscoderInput(org.apache.batik.transcoder.TranscoderInput) StringReader(java.io.StringReader) PDFTranscoder(org.apache.fop.svg.PDFTranscoder)

Aggregations

StringReader (java.io.StringReader)1 TranscoderInput (org.apache.batik.transcoder.TranscoderInput)1 TranscoderOutput (org.apache.batik.transcoder.TranscoderOutput)1 PDFTranscoder (org.apache.fop.svg.PDFTranscoder)1