private synchronized void init() throws TranscoderException { if (!initialized) { if (transcoderInput == null) { throw new IllegalStateException("input == null"); } initialized = true; super.transcode(transcoderInput, null); } }
/** * Transcodes the specified Document as an image in the specified output. * * @param document the document to transcode * @param uri the uri of the document or null if any * @param output the ouput where to transcode * @exception TranscoderException if an error occured while transcoding */ protected void transcode(Document document, String uri, TranscoderOutput output) throws TranscoderException { super.transcode(document, uri, output); // We do this to hide 'ctx' from the SVGAbstractTranscoder // otherwise it will dispose of the context before we can // print the document. theCtx = ctx; ctx = null; } /**
/** * Transcodes the specified Document as an image in the specified output. * * @param document the document to transcode * @param uri the uri of the document or null if any * @param output the ouput where to transcode * @exception TranscoderException if an error occured while transcoding */ protected void transcode(Document document, String uri, TranscoderOutput output) throws TranscoderException { super.transcode(document, uri, output); // We do this to hide 'ctx' from the SVGAbstractTranscoder // otherwise it will dispose of the context before we can // print the document. theCtx = ctx; ctx = null; } /**
private synchronized void init() throws TranscoderException { if (!initialized) { if (transcoderInput == null) { throw new IllegalStateException("input == null"); } initialized = true; super.transcode(transcoderInput, null); } }
@Override protected void transcode(Document svg, String uri, TranscoderOutput out) throws TranscoderException { // Note: We have to initialize user agent here and not in ::createUserAgent() as method // is called before our constructor is called in the super constructor. this.userAgent = new OpenHtmlUserAgent(this.fontResolver); super.transcode(svg, uri, out); outputDevice.drawWithGraphics((float)x, (float)y, width, height, new OutputDeviceGraphicsDrawer() { @Override public void render(Graphics2D graphics2D) { /* * Do the real paint */ PDFTranscoder.this.root.paint(graphics2D); } }); }
width = (int)pageFormat.getImageableWidth(); height = (int)pageFormat.getImageableHeight(); super.transcode ((TranscoderInput)printedInputs.get(pageIndex),null); curIndex = pageIndex;
width = (int)pageFormat.getImageableWidth(); height = (int)pageFormat.getImageableHeight(); super.transcode ((TranscoderInput)printedInputs.get(pageIndex),null); curIndex = pageIndex;
super.transcode(document, uri, output);
super.transcode(document, uri, output);