//
// Build a PrintTranscoder to handle printing
// of the svgDocument object
//
PrintTranscoder pt = new PrintTranscoder();
//
// Set transcoding hints
//
if (application.getXMLParserClassName() != null) {
pt.addTranscodingHint
(JPEGTranscoder.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();