Examples of XhtmlNamespaceHandler


Examples of org.xhtmlrenderer.simple.extend.XhtmlNamespaceHandler

   *
   * @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);
View Full Code Here

Examples of org.xhtmlrenderer.simple.extend.XhtmlNamespaceHandler

   *
   * @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);
View Full Code Here

Examples of org.xhtmlrenderer.simple.extend.XhtmlNamespaceHandler

    public void setDocument(String uri) {
        setDocument(loadDocument(uri), uri);
    }
   
    public void setDocument(Document doc, String url) {
        setDocument(doc, url, new XhtmlNamespaceHandler());
    }
View Full Code Here

Examples of org.xhtmlrenderer.simple.extend.XhtmlNamespaceHandler

   *
   * @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);
View Full Code Here

Examples of org.xhtmlrenderer.simple.extend.XhtmlNamespaceHandler

   *
   * @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);
View Full Code Here

Examples of org.xhtmlrenderer.simple.extend.XhtmlNamespaceHandler

                panel.setDocumentFromString(
                        "<html style='position: absolute; background-color: red;'>" +
                                "    Several words that won't wrap" +
                                "</html>",
                        null,
                        new XhtmlNamespaceHandler());

                Dimension savedSize = panel.getSize();

                // Set the panel size to some artificially large size; the render engine will actually calculate
                // the actual (preferred) size based on the document content. Setting it to a large size here prevents
View Full Code Here

Examples of org.xhtmlrenderer.simple.extend.XhtmlNamespaceHandler

                if (renderTo == TO_SWING) {
                    SwingUtilities.invokeLater(new Runnable() {
                        public void run() {
                            try {
                                curFrom = startAt;
                                xpanel.setDocument(doc, null, new XhtmlNamespaceHandler());
                                xpanel.getSharedContext().getCss().getCascadedStyle(null, false);
                            } catch (Throwable e) {
                                JOptionPane.showMessageDialog(frame, "Can't load document (table of glyphs). Err: " + e.getMessage());
                            }
                            enableButtons();
View Full Code Here

Examples of org.xhtmlrenderer.simple.extend.XhtmlNamespaceHandler

        final ITextRenderer renderer = new ITextRenderer();
        FileOutputStream fos = null;
        try {
            fos = new FileOutputStream(f);
            BufferedOutputStream bos = new BufferedOutputStream(fos);
            renderer.setDocument(doc, null, new XhtmlNamespaceHandler());
            ITextFontResolver resolver = renderer.getFontResolver();
            // TODO: encoding is hard-coded as IDENTITY_H; maybe give user option to override
            resolver.addFont(
                    fontPathTF.getText(),
                    BaseFont.IDENTITY_H,
View Full Code Here

Examples of org.xhtmlrenderer.simple.extend.XhtmlNamespaceHandler

     * @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());
    }
View Full Code Here

Examples of org.xhtmlrenderer.simple.extend.XhtmlNamespaceHandler

     */
    // 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());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.