|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.itextpdf.tool.xml.XMLWorkerHelper
public class XMLWorkerHelper
A helper class for parsing XHTML/CSS or XML flow to PDF.
| Method Summary | |
|---|---|
CssFile |
getCSS(InputStream in)
|
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 XMLWorkerHelper |
getInstance()
Get a Singleton XMLWorkerHelper |
void |
parseXHtml(ElementHandler d,
InputStream in,
Charset charset)
|
void |
parseXHtml(ElementHandler d,
Reader in)
Parses the xml data in the given reader and sends created Element
s to the defined ElementHandler.This method configures the XMLWorker and XMLParser to parse (X)HTML/CSS and accept unknown tags. |
void |
parseXHtml(PdfWriter writer,
Document doc,
InputStream in,
Charset charset)
|
void |
parseXHtml(PdfWriter writer,
Document doc,
InputStream in,
InputStream inCssFile,
Charset charset)
|
void |
parseXHtml(PdfWriter writer,
Document doc,
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 |
|---|
public static XMLWorkerHelper getInstance()
public CssFile getCSS(InputStream in)
public CssFile getDefaultCSS()
public void parseXHtml(ElementHandler d,
Reader in)
throws IOException
Element
s to the defined ElementHandler.
d - the handlerin - the reader
IOException - thrown when something went wrong with the IO
public void parseXHtml(PdfWriter writer,
Document doc,
Reader in)
throws IOException
writer - the PdfWriterdoc - the Documentin - the reader
IOException - thrown when something went wrong with the IO
public void parseXHtml(PdfWriter writer,
Document doc,
InputStream in,
Charset charset)
throws IOException
writer - the writer to usedoc - the document to usein - the InputStream of the XHTML source.charset - the charset to use
IOException - if the InputStream could not be read.
public void parseXHtml(PdfWriter writer,
Document doc,
InputStream in,
InputStream inCssFile,
Charset charset)
throws IOException
writer - the writer to usedoc - the document to usein - the InputStream of the XHTML source.in - the CssFiles of the css files.charset - the charset to use
IOException - if the InputStream could not be read.
public void parseXHtml(ElementHandler d,
InputStream in,
Charset charset)
throws IOException
d - the ElementHandlerin - the InputStreamcharset - the charset to use
IOException - if something went seriously wrong with IO.public CSSResolver getDefaultCssResolver(boolean addDefaultCss)
addDefaultCss - true if the defaultCss should already be added.
protected TagProcessorFactory getDefaultTagProcessorFactory()
Tags.getHtmlTagProcessorFactory(). On subsequent calls the same
TagProcessorFactory is returned every time.
DefaultTagProcessorFactory that maps HTML tags to TagProcessors
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||