@OpenApiAll public class PPTXCreator extends AbstractDocumentCreator implements IHTMLHandler
Constructor and Description |
---|
PPTXCreator() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
changeColorFormat(java.lang.String color)
Change color(3-digits RGB, 6-digits RGB and color name) to RGB format.
|
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 PPTX 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.
|
java.lang.String |
getPptxColorStyle(java.lang.String color)
Get color code.
|
java.lang.String |
getPptxFontName(java.lang.String fontName)
Convert HTML font name to PPTX font name code.
|
java.lang.String |
getPptxFontSize(java.lang.String htmlSize)
Convert html font size to PPTX font size.
|
void |
setDocumentPage(DocumentPage page)
set document page property.
|
void |
setPaperHeight(float height)
set paper height.
|
void |
setPaperWidth(float width)
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 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 PPTX 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.IHTMLHandler.startTag(javax.swing.text.html.HTML.Tag,
javax.swing.text.AttributeSet)
public void endTag(javax.swing.text.html.HTML.Tag tag)
endTag
in interface IHTMLHandler
tag
- HTML TagIHTMLHandler.endTag(javax.swing.text.html.HTML.Tag)
public void characters(char[] data)
characters
in interface IHTMLHandler
data
- The characters.IHTMLHandler.characters(char[])
public void comment(char[] data)
IHTMLHandler
comment
in interface IHTMLHandler
data
- An array holding the characters in the document.public void endDocument()
endDocument
in interface IHTMLHandler
IHTMLHandler.endDocument()
public void setPaperHeight(float height)
setPaperHeight
in interface IDocumentCreator
height
- paper heightIDocumentCreator.setPaperHeight(float)
public void setPaperWidth(float width)
setPaperWidth
in interface IDocumentCreator
width
- paper width.IDocumentCreator.setPaperWidth(float)
public java.lang.String getPptxColorStyle(java.lang.String color)
color
- colorpublic java.lang.String changeColorFormat(java.lang.String color)
color
- color formatpublic java.lang.String getPptxFontName(java.lang.String fontName)
fontName
- html font namepublic java.lang.String getPptxFontSize(java.lang.String htmlSize)
htmlSize
- HTML font sizepublic 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