@OpenApiAll public class DOCXCreator extends AbstractDocumentCreator implements IHTMLHandler
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
HTML_TABLE_COLUMN_MINWIDTH |
static java.lang.String |
HTML_TABLE_COLUMN_MINWIDTH_DEFAULT |
static java.lang.String |
HTML_TABLE_NO_RESIZE |
static java.lang.String |
HTML_TABLE_USE_COLUMN_MINWIDTH |
Constructor and Description |
---|
DOCXCreator() |
Modifier and Type | Method and Description |
---|---|
void |
characters(char[] data)
Receive notification of character data inside a tag.
|
void |
comment(char[] data)
Receive notification of comment data.
|
void |
convert(java.io.Reader reader,
java.io.Writer writer)
Convert the HTML content from reader into DOCX document.
|
void |
endDocument()
Receive notification of end document tag.
|
void |
endTag(javax.swing.text.html.HTML.Tag tag)
Receive notification of the end of a tag.
|
void |
setDocumentPage(DocumentPage page)
set document page property.
|
void |
setPaperHeight(float h)
set paper height.
|
void |
setPaperWidth(float w)
set paper width.
|
void |
setProperties(java.util.Properties properties)
Not Implemented.
|
void |
startTag(javax.swing.text.html.HTML.Tag tag,
javax.swing.text.AttributeSet attributes)
Receive notification of the start of a tag.
|
createImageTool, getFormatter, getStyleByCSSParser, getStyledDocument, setFormatter, setStyledDocument
public static final java.lang.String HTML_TABLE_NO_RESIZE
public static final java.lang.String HTML_TABLE_USE_COLUMN_MINWIDTH
public static final java.lang.String HTML_TABLE_COLUMN_MINWIDTH
public static final java.lang.String HTML_TABLE_COLUMN_MINWIDTH_DEFAULT
public void convert(java.io.Reader reader, java.io.Writer writer) throws java.io.IOException
convert
in interface IDocumentCreator
reader
- the reader containing HTML source.writer
- the writer containing DOCX document.java.io.IOException
- If any IO errors occur.IDocumentCreator.convert(java.io.Reader, java.io.Writer)
public void startTag(javax.swing.text.html.HTML.Tag tag, javax.swing.text.AttributeSet attributes)
startTag
in interface IHTMLHandler
tag
- HTML tagattributes
- The attributes attached to the tag. If there are no attributes, it shall be an empty
Attributes object.public void endTag(javax.swing.text.html.HTML.Tag tag)
endTag
in interface IHTMLHandler
tag
- HTML tagpublic void characters(char[] data)
characters
in interface IHTMLHandler
data
- The characters.public void endDocument()
endDocument
in interface IHTMLHandler
IHTMLHandler.endDocument()
public void setPaperHeight(float h)
setPaperHeight
in interface IDocumentCreator
h
- paper height.IDocumentCreator.setPaperHeight(float)
public void setPaperWidth(float w)
setPaperWidth
in interface IDocumentCreator
w
- paper width.IDocumentCreator.setPaperWidth(float)
public void comment(char[] data)
IHTMLHandler
comment
in interface IHTMLHandler
data
- An array holding the characters in the document.public void setProperties(java.util.Properties properties)
setProperties
in interface IDocumentCreator
properties
- the propertiespublic void setDocumentPage(DocumentPage page)
IDocumentCreator
setDocumentPage
in interface IDocumentCreator
page
- page property.Copyright © 2010 - No Magic Asia