//
// Build a PrintTranscoder to handle printing
// of the svgDocument object
//
PrintTranscoder pt = new PrintTranscoder();
//
// Set transcoding hints
//
pt.addTranscodingHint(PrintTranscoder.KEY_XML_PARSER_CLASSNAME,
application.getXMLParserClassName());
pt.addTranscodingHint(PrintTranscoder.KEY_SHOW_PAGE_DIALOG,
Boolean.TRUE);
pt.addTranscodingHint(PrintTranscoder.KEY_SHOW_PRINTER_DIALOG,
Boolean.TRUE);
//
// Do transcoding now
//
pt.transcode(new TranscoderInput(uri), null);
//
// Print
//
try {
pt.print();
} catch (PrinterException ex) {
userAgent.displayError(ex);
}
}
}.start();