Class PPTXCreator
java.lang.Object
com.nomagic.magicreport.format.html.AbstractDocumentCreator
com.nomagic.magicreport.format.html.PPTXCreator
- All Implemented Interfaces:
IHTMLHandler,IDocumentCreator
The class use for create Html to Pptx content.
- Since:
- Feb 9, 2010
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchangeColorFormat(String color) Change color(3-digits RGB, 6-digits RGB and color name) to RGB format.voidcharacters(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 PPTX document.voidReceive notification of end document tag.voidReceive notification of the end of a tag.getPptxColorStyle(String color) Get color code.getPptxFontName(String fontName) Convert HTML font name to PPTX font name code.getPptxFontSize(String htmlSize) Convert html font size to PPTX font size.voidsetDocumentPage(com.nomagic.magicreport.DocumentPage page) set document page property.voidsetPaperHeight(float height) set paper height.voidsetPaperWidth(float width) 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
-
Constructor Details
-
PPTXCreator
public PPTXCreator()
-
-
Method Details
-
convert
Convert the HTML content from reader into PPTX document.- Specified by:
convertin interfaceIDocumentCreator- Parameters:
reader- the reader containing HTML source.writer- the writer containing PPTX 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.- See Also:
-
endTag
Receive notification of the end of a tag.- Specified by:
endTagin interfaceIHTMLHandler- Parameters:
tag- HTML Tag- See Also:
-
characters
public void characters(char[] data) Receive notification of character data inside a tag.- Specified by:
charactersin interfaceIHTMLHandler- Parameters:
data- The characters.- 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.
-
endDocument
public void endDocument()Receive notification of end document tag.- Specified by:
endDocumentin interfaceIHTMLHandler- See Also:
-
setPaperHeight
public void setPaperHeight(float height) set paper height.- Specified by:
setPaperHeightin interfaceIDocumentCreator- Parameters:
height- paper height- See Also:
-
setPaperWidth
public void setPaperWidth(float width) set paper width.- Specified by:
setPaperWidthin interfaceIDocumentCreator- Parameters:
width- paper width.- See Also:
-
getPptxColorStyle
Get color code.- Parameters:
color- color- Returns:
- color
-
changeColorFormat
Change color(3-digits RGB, 6-digits RGB and color name) to RGB format.- Parameters:
color- color format- Returns:
- RGB format and return empty String when invalid color format.
-
getPptxFontName
Convert HTML font name to PPTX font name code.- Parameters:
fontName- html font name- Returns:
- PPTX font name code
-
getPptxFontSize
Convert html font size to PPTX font size.- Parameters:
htmlSize- HTML font size- Returns:
- PPTX font size
-
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.
-