com.itextpdf.tool.xml.svg
Class XMLHelperForSVG

java.lang.Object
  extended by com.itextpdf.tool.xml.svg.XMLHelperForSVG

public class XMLHelperForSVG
extends Object


Method Summary
 CssFile getDefaultCSS()
           
 CSSResolver getDefaultCssResolver(boolean addDefaultCss)
          Get a CSSResolver implementation.
protected  TagProcessorFactory getDefaultTagProcessorFactory()
          Retrieves the default factory for processing HTML tags from Tags.getHtmlTagProcessorFactory().
static XMLHelperForSVG getInstance()
          Get a Singleton XMLWorkerHelper
 PdfTemplate parseToTemplate(PdfContentByte cb, Reader in)
          Parses the xml data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static XMLHelperForSVG getInstance()
Get a Singleton XMLWorkerHelper

Returns:
a singleton instance of XMLWorkerHelper

getDefaultCSS

public CssFile getDefaultCSS()
Returns:
the default css file.

parseToTemplate

public PdfTemplate parseToTemplate(PdfContentByte cb,
                                   Reader in)
                            throws IOException
Parses the xml data. This method configures the XMLWorker to parse (X)HTML/CSS and accept unknown tags. Writes the output in the given PdfWriter with the given document.

Parameters:
writer - the PdfWriter
doc - the Document
in - the reader
Throws:
IOException - thrown when something went wrong with the IO

getDefaultCssResolver

public CSSResolver getDefaultCssResolver(boolean addDefaultCss)
Get a CSSResolver implementation.

Parameters:
addDefaultCss - true if the defaultCss should already be added.
Returns:
the default CSSResolver

getDefaultTagProcessorFactory

protected TagProcessorFactory getDefaultTagProcessorFactory()
Retrieves the default factory for processing HTML tags from Tags.getHtmlTagProcessorFactory(). On subsequent calls the same TagProcessorFactory is returned every time.

Returns:
a DefaultTagProcessorFactory that maps HTML tags to TagProcessors


Copyright © 2012. All Rights Reserved.