public void notify(Document doc) throws SAXException {
try {
TranscoderInput transInput = new TranscoderInput(doc);
// Buffering is done by the pipeline (See shouldSetContentLength)
TranscoderOutput transOutput = new TranscoderOutput(this.output);
transcoder.transcode(transInput, transOutput);
} catch (TranscoderException ex) {
if (ex.getException() != null) {
if (getLogger().isDebugEnabled()) {
getLogger().debug("Got transcoder exception writing image, rethrowing nested exception", ex);