If I am to go:

//*********************************************************************
import ...;

int colorOne = 7;
int ftcfe = 9;

HWPFDocument document = new HWPFDocument();
FontTable fontTable = document.getFontTable();
List fontList = Arrays.asList(fontTable.getFontNames()); //This is how to wrap a primitive array.
ListIterator fonts = fontList.iterator();

while(fonts.hasNext())
{
System.out.println(next.toString());    //A
}

Range range = document.getOverallRange();
CharacterRun runOne = range.getCharacterRun(0);    //B
CharacterRun runTwo = runOne.insertAfter("This is some initial Text");
runTwo.setBold(true);
runTwo.setColor(colorOne); //C
runTwo.setFontSize(16);
runTwo.setFtcFE(ftcfe); //D
...

document.write(new FileOutputStream(new File("WordFile1.doc")));
//*********************************************************************


-A: if done with an initially empty constructor HWPFDocument, will this print all of the TrueType Font names visible through the JVM from the particular OS?
     Will the index of a particular font be the int value for use in //D  ?

-B: Is this how one creates consecutive new CharacterRuns? Can you create your own
    CharacterRuns within a Range stipulating a start index?
     What happens with how CharacterRuns end?

-C: Should be a simple one; where are the names/indicies for color values here?

-D: If there are TTF names and indicies at //A, is this the index data needed here at //D ?

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to