Package com.inductiveautomation.rm.out
Class RMRTFWriter
java.lang.Object
com.inductiveautomation.rm.out.RMRTFWriter
Write RTF for a document.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidConvert the shape into an image stream and embedd that into the rtf.voidappendRTF(RMShape aShape, PrintStream ps) voidappendTable(RMShapeTable table, PrintStream ps) Append table.voidappendText(RMXString s, PrintStream ps) byte[]getBytes(RMDocument aDoc) Returns RTF bytes for given document.intintLooks up a font in the font table and adds it if it's not there.intbyte[]getRTFForShapes(RMDocument aDoc) Returns RTF for document Shapes.RTFBorderStyle(boolean show, int width) Returns the rtf control string for borders.inttwip(double x) Convert an rm coord to rtf 'twips'.voidOutput all the fonts as an RTF fonttable.voidwriteFont(PrintStream aPS, RMFontFile aFontFile) Writes an entry in the font table for a particular font.voidOutput all the fonts as an RTF FontTable.
-
Constructor Details
-
RMRTFWriter
public RMRTFWriter()
-
-
Method Details
-
getBytes
Returns RTF bytes for given document. -
getFontIndex
Looks up a font in the font table and adds it if it's not there. Returns the name that represents the font in the rtf ("f0", "f1", etc.) -
writeFontTable
Output all the fonts as an RTF FontTable. Fonts are all referenced by name, never embedded. -
writeFont
Writes an entry in the font table for a particular font. -
getRTFFontFamily
-
getRTFFontCharset
-
writeColorTable
Output all the fonts as an RTF fonttable. Fonts are all referenced by name, never embedded. -
getColorIndex
-
twip
public int twip(double x) Convert an rm coord to rtf 'twips'. A twip is a 20th of a point. -
getRTFForShapes
Returns RTF for document Shapes. -
appendRTF
-
appendTable
Append table. Tables are intermediary objects used for positioning content. Thus, tables themselves shouldn't do any drawing -
appendText
-
RTFBorderStyle
Returns the rtf control string for borders. Currently only does on or off. RTF has a zillion other possibilities. -
appendImageBytesForShape
Convert the shape into an image stream and embedd that into the rtf.
-