|
Platypus | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.pz.platypus.plugin.pdf.commands.PdfSymbol
public class PdfSymbol
This is the command-equivalent that is called by PDF plugin to 'execute' a symbol. It looks what the chars to ouput are to generate the symbol in PDF and it outputs those as text. If Unicode conversion is necessary, that is performed as well.
| Field Summary | |
|---|---|
private java.lang.String |
passedValue
|
private java.lang.String |
root
|
| Constructor Summary | |
|---|---|
PdfSymbol(java.lang.String symbolRoot,
java.lang.String stringToEmit)
|
|
| Method Summary | |
|---|---|
(package private) java.lang.String |
extractFontName(java.lang.String fontName,
GDD gdd,
Token tok)
Extracts the font name from an extended entry in PdfSymbols.properties, such as: [trademark]={SYMBOL}\\u00E4, where the font name is between braces (so SYMBOL, in this example). |
java.lang.String |
getCharCode(java.lang.String symEquiv)
Get the Unicode character code to emit |
char |
getCharValueForUnicode(java.lang.String unicodeValue)
Converts a unicode value in the format u9999 to a char representing that number, which can be correctly output as the respective glyph by iText. |
java.lang.String |
getFontName(java.lang.String symbolEquiv,
GDD gdd,
Token tok)
|
java.lang.String |
getRoot()
get the root of the command. |
java.lang.String |
getSymEquivalent()
|
(package private) java.lang.String |
getUnicodeValue(java.lang.String symbolAsUnicode)
Accepts a symbol specified as a unicode symbol (such as \\u12CD). |
int |
process(OutputContextable context,
Token tok,
int tokNum)
method for processing this command in the output plugin. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.lang.String root
private java.lang.String passedValue
| Constructor Detail |
|---|
public PdfSymbol(java.lang.String symbolRoot,
java.lang.String stringToEmit)
| Method Detail |
|---|
public int process(OutputContextable context,
Token tok,
int tokNum)
OutputCommandable
process in interface OutputCommandablecontext - the context/state of the output documenttok - the command token as found in the token streamtokNum - the number of the token in the token listpublic java.lang.String getCharCode(java.lang.String symEquiv)
symEquiv - the symbol equivalent (consisting of what is on the right of the = sign
in the symbols resource file. Could contain font + char, or just char to emit.
public java.lang.String getFontName(java.lang.String symbolEquiv,
GDD gdd,
Token tok)
java.lang.String extractFontName(java.lang.String fontName,
GDD gdd,
Token tok)
fontName - the string starting with the opening bracegdd - to look up literals in case of an errortok - to look up file/line# for use in error message, if any
java.lang.String getUnicodeValue(java.lang.String symbolAsUnicode)
symbolAsUnicode - the Unicode number as a hex value.
public char getCharValueForUnicode(java.lang.String unicodeValue)
unicodeValue - four-digit hex value that has to be converted to a char
public java.lang.String getRoot()
OutputCommandable
getRoot in interface OutputCommandablepublic java.lang.String getSymEquivalent()
|
Platypus | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||