gpt4 book ai didi

org.xhtmlrenderer.simple.extend.XhtmlNamespaceHandler.()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-23 00:51:05 27 4
gpt4 key购买 nike

本文整理了Java中org.xhtmlrenderer.simple.extend.XhtmlNamespaceHandler.<init>()方法的一些代码示例,展示了XhtmlNamespaceHandler.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XhtmlNamespaceHandler.<init>()方法的具体详情如下:
包路径:org.xhtmlrenderer.simple.extend.XhtmlNamespaceHandler
类名称:XhtmlNamespaceHandler
方法名:<init>

XhtmlNamespaceHandler.<init>介绍

暂无

代码示例

代码示例来源:origin: org.xhtmlrenderer/flying-saucer-pdf-itext5

public void setDocument(Document doc, String url) {
  setDocument(doc, url, new XhtmlNamespaceHandler());
}

代码示例来源:origin: org.xhtmlrenderer/flying-saucer-pdf-openpdf

public void setDocument(Document doc, String url) {
  setDocument(doc, url, new XhtmlNamespaceHandler());
}

代码示例来源:origin: org.xhtmlrenderer/flying-saucer-pdf

public void setDocument(Document doc, String url) {
  setDocument(doc, url, new XhtmlNamespaceHandler());
}

代码示例来源:origin: org.xhtmlrenderer/core-renderer

public void setDocument(Document doc, String url) {
  setDocument(doc, url, new XhtmlNamespaceHandler());
}

代码示例来源:origin: com.google.code.maven-play-plugin.org.xhtmlrenderer/core-renderer

public void setDocument(Document doc, String url) {
  setDocument(doc, url, new XhtmlNamespaceHandler());
}

代码示例来源:origin: org.xhtmlrenderer/core-renderer

/**
 * Renders a Document using a URL as a base URL for relative
 * paths.
 *
 * @param doc The new document value
 * @param url The new document value
 */
public void setDocument(Document doc, String url) {
  resetListeners();
  super.setDocument(doc, url, new XhtmlNamespaceHandler());
}

代码示例来源:origin: com.google.code.maven-play-plugin.org.xhtmlrenderer/core-renderer

/**
 * Renders a Document read from an InputStream using a URL
 * as a base URL for relative paths.
 *
 * @param stream The stream to read the Document from.
 * @param url    The URL used to resolve relative path references.
 */
// TODO: should throw more specific exception (PWW 25/07/2006)
public void setDocument(InputStream stream, String url)
    throws Exception {
  resetListeners();
  setDocument(stream, url, new XhtmlNamespaceHandler());
}

代码示例来源:origin: com.google.code.maven-play-plugin.org.xhtmlrenderer/core-renderer

/**
 * Renders a Document using a URL as a base URL for relative
 * paths.
 *
 * @param doc The new document value
 * @param url The new document value
 */
public void setDocument(Document doc, String url) {
  resetListeners();
  setDocument(doc, url, new XhtmlNamespaceHandler());
}

代码示例来源:origin: org.xhtmlrenderer/core-renderer

/**
 * Renders a Document read from an InputStream using a URL
 * as a base URL for relative paths.
 *
 * @param stream The stream to read the Document from.
 * @param url    The URL used to resolve relative path references.
 */
// TODO: should throw more specific exception (PWW 25/07/2006)
public void setDocument(InputStream stream, String url)
    throws Exception {
  resetListeners();
  super.setDocument(stream, url, new XhtmlNamespaceHandler());
}

代码示例来源:origin: openimaj/openimaj

p.setDocumentFromString(h, resource, new XhtmlNamespaceHandler());

代码示例来源:origin: org.openimaj/demos

p.setDocumentFromString(h, resource, new XhtmlNamespaceHandler());

代码示例来源:origin: com.google.code.maven-play-plugin.org.xhtmlrenderer/core-renderer

/**
 * Renders the XML document if necessary and returns the root Box. If already rendered, same Box
 * reference will be returned.
 *
 * @return The XML rendered as a Box.
 */
public Box render() {
  if (!rendered) {
    setDocument(loadDocument(sourceDocument), sourceDocumentBase, new XhtmlNamespaceHandler());
    layout(this.width);
    height = this.height == -1 ? root.getHeight() : this.height;
    BufferedImage outputImage = createBufferedImage(this.width, height);
    outputDevice = new Java2DOutputDevice(outputImage);
    Graphics2D newG = (Graphics2D) outputImage.getGraphics();
    try {
      if ( renderingHints != null ) {
        newG.getRenderingHints().putAll(renderingHints);
      }
      RenderingContext rc = sharedContext.newRenderingContextInstance();
      rc.setFontContext(new Java2DFontContext(newG));
      rc.setOutputDevice(outputDevice);
      sharedContext.getTextRenderer().setup(rc.getFontContext());
      root.getLayer().paint(rc);
    } finally {
      if (newG != null) newG.dispose();
    }
    rendered = true;
  }
  return root;
}

代码示例来源:origin: org.xhtmlrenderer/core-renderer

/**
 * Renders the XML document if necessary and returns the resulting image. If already rendered, same image
 * reference will be returned.
 *
 * {@link #getImage(int)} with the target width.
 * 
 * @return The XML rendered as a BufferedImage.
 */
public BufferedImage getImage() {
  if (!rendered) {
    setDocument((doc == null ? loadDocument(sourceDocument) : doc), sourceDocumentBase, new XhtmlNamespaceHandler());
    layout(this.width);
    height = this.height == -1 ? root.getHeight() : this.height;
    outputImage = createBufferedImage(this.width, height);
    outputDevice = new Java2DOutputDevice(outputImage);
    Graphics2D newG = (Graphics2D) outputImage.getGraphics();
    if ( renderingHints != null ) {
      newG.getRenderingHints().putAll(renderingHints);
    }
    RenderingContext rc = sharedContext.newRenderingContextInstance();
    rc.setFontContext(new Java2DFontContext(newG));
    rc.setOutputDevice(outputDevice);
    sharedContext.getTextRenderer().setup(rc.getFontContext());
    root.getLayer().paint(rc);
    newG.dispose();
    rendered = true;
  }
  return outputImage;
}

代码示例来源:origin: com.google.code.maven-play-plugin.org.xhtmlrenderer/core-renderer

/**
 * Renders the XML document if necessary and returns the resulting image. If already rendered, same image
 * reference will be returned.
 *
 * {@link #getImage(int)} with the target width.
 * 
 * @return The XML rendered as a BufferedImage.
 */
public BufferedImage getImage() {
  if (!rendered) {
    setDocument((doc == null ? loadDocument(sourceDocument) : doc), sourceDocumentBase, new XhtmlNamespaceHandler());
    layout(this.width);
    height = this.height == -1 ? root.getHeight() : this.height;
    outputImage = createBufferedImage(this.width, height);
    outputDevice = new Java2DOutputDevice(outputImage);
    Graphics2D newG = (Graphics2D) outputImage.getGraphics();
    if ( renderingHints != null ) {
      newG.getRenderingHints().putAll(renderingHints);
    }
    RenderingContext rc = sharedContext.newRenderingContextInstance();
    rc.setFontContext(new Java2DFontContext(newG));
    rc.setOutputDevice(outputDevice);
    sharedContext.getTextRenderer().setup(rc.getFontContext());
    root.getLayer().paint(rc);
    newG.dispose();
    rendered = true;
  }
  return outputImage;
}

代码示例来源:origin: org.xhtmlrenderer/core-renderer

/**
 * Renders the XML document if necessary and returns the root Box. If already rendered, same Box
 * reference will be returned.
 *
 * @return The XML rendered as a Box.
 */
public Box render() {
  if (!rendered) {
    setDocument(loadDocument(sourceDocument), sourceDocumentBase, new XhtmlNamespaceHandler());
    layout(this.width);
    height = this.height == -1 ? root.getHeight() : this.height;
    BufferedImage outputImage = createBufferedImage(this.width, height);
    outputDevice = new Java2DOutputDevice(outputImage);
    Graphics2D newG = (Graphics2D) outputImage.getGraphics();
    try {
      if ( renderingHints != null ) {
        newG.getRenderingHints().putAll(renderingHints);
      }
      RenderingContext rc = sharedContext.newRenderingContextInstance();
      rc.setFontContext(new Java2DFontContext(newG));
      rc.setOutputDevice(outputDevice);
      sharedContext.getTextRenderer().setup(rc.getFontContext());
      root.getLayer().paint(rc);
    } finally {
      if (newG != null) newG.dispose();
    }
    rendered = true;
  }
  return root;
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com