public Java2DSVGReplacedElement(Element e, SVGDrawer svgImpl, int width, int height, Box box, CssContext c) { super(width, height); this._svgImage = svgImpl.buildSVGImage(e, box, c, width, height, /* dots-per-pixel */ 1); }
private void setDocument(Document doc, String url, NamespaceHandler nsh) { _doc = doc; /* * Apply potential DOM mutations */ for (FSDOMMutator domMutator : _domMutators) domMutator.mutateDocument(doc); //TODOgetFontResolver().flushFontFaceFonts(); if (Configuration.isTrue("xr.cache.stylesheets", true)) { _sharedContext.getCss().flushStyleSheets(); } else { _sharedContext.getCss().flushAllStyleSheets(); } _sharedContext.setBaseURL(url); _sharedContext.setNamespaceHandler(nsh); _sharedContext.getCss().setDocumentContext(_sharedContext, _sharedContext.getNamespaceHandler(), doc, new NullUserInterface()); getFontResolver().importFontFaces(_sharedContext.getCss().getFontFaceRules()); if (_svgImpl != null) { _svgImpl.importFontFaceRules(_sharedContext.getCss().getFontFaceRules(), _sharedContext); } if (_mathMLImpl != null) { _mathMLImpl.importFontFaceRules(_sharedContext.getCss().getFontFaceRules(), _sharedContext); } }
private void setDocumentP(Document doc, String url, NamespaceHandler nsh) { _doc = doc; /* * Apply potential DOM mutations */ for (FSDOMMutator domMutator : _domMutators) domMutator.mutateDocument(doc); getFontResolver().flushFontFaceFonts(); if (Configuration.isTrue("xr.cache.stylesheets", true)) { _sharedContext.getCss().flushStyleSheets(); } else { _sharedContext.getCss().flushAllStyleSheets(); } _sharedContext.setBaseURL(url); _sharedContext.setNamespaceHandler(nsh); _sharedContext.getCss().setDocumentContext(_sharedContext, _sharedContext.getNamespaceHandler(), doc, new NullUserInterface()); getFontResolver().importFontFaces(_sharedContext.getCss().getFontFaceRules()); if (_svgImpl != null) { _svgImpl.importFontFaceRules(_sharedContext.getCss().getFontFaceRules(), _sharedContext); } if (_mathmlImpl != null) { _mathmlImpl.importFontFaceRules(_sharedContext.getCss().getFontFaceRules(), _sharedContext); } }
public PdfBoxSVGReplacedElement(Element e, SVGDrawer svgImpl, int cssWidth, int cssHeight, Box box, CssContext css, SharedContext c) { this.svgImage = svgImpl.buildSVGImage(e, box, css, cssWidth, cssHeight, c.getDotsPerPixel()); imageMap = ImageMapParser.findAndParseMap(e, c); }
/** * @deprecated Use close instead. */ @Deprecated public void cleanup() { _outputDevice.close(); _sharedContext.removeFromThread(); ThreadCtx.cleanup(); // Close all still open font files ((PdfBoxFontResolver)getSharedContext().getFontResolver()).close(); if (_svgImpl != null) { try { _svgImpl.close(); } catch (IOException e) { } } if (_mathmlImpl != null) { try { _mathmlImpl.close(); } catch (IOException e) { } } }
private void setDocumentP(Document doc, String url, NamespaceHandler nsh) { _doc = doc; /* * Apply potential DOM mutations */ for (FSDOMMutator domMutator : _domMutators) domMutator.mutateDocument(doc); getFontResolver().flushFontFaceFonts(); if (Configuration.isTrue("xr.cache.stylesheets", true)) { _sharedContext.getCss().flushStyleSheets(); } else { _sharedContext.getCss().flushAllStyleSheets(); } _sharedContext.setBaseURL(url); _sharedContext.setNamespaceHandler(nsh); _sharedContext.getCss().setDocumentContext(_sharedContext, _sharedContext.getNamespaceHandler(), doc, new NullUserInterface()); getFontResolver().importFontFaces(_sharedContext.getCss().getFontFaceRules()); if (_svgImpl != null) { _svgImpl.importFontFaceRules(_sharedContext.getCss().getFontFaceRules(), _sharedContext); } if (_mathmlImpl != null) { _mathmlImpl.importFontFaceRules(_sharedContext.getCss().getFontFaceRules(), _sharedContext); } }
public PdfBoxSVGReplacedElement(Element e, SVGDrawer svgImpl, int cssWidth, int cssHeight, Box box, CssContext css, SharedContext c) { this.svgImage = svgImpl.buildSVGImage(e, box, css, cssWidth, cssHeight, c.getDotsPerPixel()); imageMap = ImageMapParser.findAndParseMap(e, c); }
/** * @deprecated Use close instead. */ @Deprecated public void cleanup() { _outputDevice.close(); _sharedContext.removeFromThread(); ThreadCtx.cleanup(); // Close all still open font files ((PdfBoxFontResolver)getSharedContext().getFontResolver()).close(); if (_svgImpl != null) { try { _svgImpl.close(); } catch (IOException e) { } } if (_mathmlImpl != null) { try { _mathmlImpl.close(); } catch (IOException e) { } } }