Hi,
you can try the pdf-transcoder library. An example from another forum
may help:
DOMImplementation impl = SVGDOMImplementation.getDOMImplementation();
String svgNS = SVGDOMImplementation.SVG_NAMESPACE_URI;
Document document = impl.createDocument(svgNS, "svg", null);
SVGGraphics2D g2d = new SVGGraphics2D(document);
// ... draw some shapes ...
File pdf = ...
OutputStream out = new FileOutputStream(pdf);
PDFTranscoder t = new PDFTranscoder();
TranscoderInput input = new TranscoderInput(document);
TranscoderOutput output = new TranscoderOutput(out);
try {
t.transcode(input, output);
} catch (Exception ex) {
throw new IOException(ex.getMessage());
} finally {
out.flush();
out.close();
}
Regards,
Steffen
Mork0075 wrote:
> Hello,
>
> can anyone give me a piece of code how to convert a svg string into a
> pdf file?
>
> Thanks a lot :)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]