Class DOCXCreator
java.lang.Object
com.nomagic.magicreport.format.html.AbstractDocumentCreator
com.nomagic.magicreport.format.html.DOCXCreator
- All Implemented Interfaces:
IHTMLHandler,IDocumentCreator
The class use for create Html to DOCX content.
- Since:
- Feb 31, 2010
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] data) Receive notification of character data inside a tag.voidcomment(char[] data) Receive notification of comment data.voidConvert the HTML content from reader into DOCX document.voidReceive notification of end document tag.voidReceive notification of the end of a tag.voidsetDocumentPage(com.nomagic.magicreport.DocumentPage page) set document page property.voidsetPaperHeight(float h) set paper height.voidsetPaperWidth(float w) set paper width.voidsetProperties(Properties properties) Not Implemented.voidstartTag(HTML.Tag tag, AttributeSet attributes) Receive notification of the start of a tag.Methods inherited from class com.nomagic.magicreport.format.html.AbstractDocumentCreator
createImageTool, getFormatter, getStyleByCSSParser, getStyledDocument, setFormatter, setStyledDocument
-
Field Details
-
HTML_TABLE_NO_RESIZE
- See Also:
-
HTML_TABLE_USE_COLUMN_MINWIDTH
- See Also:
-
HTML_TABLE_COLUMN_MINWIDTH
- See Also:
-
HTML_TABLE_COLUMN_MINWIDTH_DEFAULT
- See Also:
-
-
Constructor Details
-
DOCXCreator
public DOCXCreator()
-
-
Method Details
-
convert
Convert the HTML content from reader into DOCX document.- Specified by:
convertin interfaceIDocumentCreator- Parameters:
reader- the reader containing HTML source.writer- the writer containing DOCX document.- Throws:
IOException- If any IO errors occur.- See Also:
-
startTag
Receive notification of the start of a tag.- Specified by:
startTagin interfaceIHTMLHandler- Parameters:
tag- HTML tagattributes- The attributes attached to the tag. If there are no attributes, it shall be an empty Attributes object.
-
endTag
Receive notification of the end of a tag.- Specified by:
endTagin interfaceIHTMLHandler- Parameters:
tag- HTML tag
-
characters
public void characters(char[] data) Receive notification of character data inside a tag.- Specified by:
charactersin interfaceIHTMLHandler- Parameters:
data- The characters.
-
endDocument
public void endDocument()Receive notification of end document tag.- Specified by:
endDocumentin interfaceIHTMLHandler- See Also:
-
setPaperHeight
public void setPaperHeight(float h) set paper height.- Specified by:
setPaperHeightin interfaceIDocumentCreator- Parameters:
h- paper height.- See Also:
-
setPaperWidth
public void setPaperWidth(float w) set paper width.- Specified by:
setPaperWidthin interfaceIDocumentCreator- Parameters:
w- paper width.- See Also:
-
comment
public void comment(char[] data) Description copied from interface:IHTMLHandlerReceive notification of comment data.- Specified by:
commentin interfaceIHTMLHandler- Parameters:
data- An array holding the characters in the document.
-
setProperties
Not Implemented.- Specified by:
setPropertiesin interfaceIDocumentCreator- Parameters:
properties- the properties
-
setDocumentPage
public void setDocumentPage(com.nomagic.magicreport.DocumentPage page) Description copied from interface:IDocumentCreatorset document page property.- Specified by:
setDocumentPagein interfaceIDocumentCreator- Parameters:
page- page property.
-