You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Amit Kumar <am...@cdac.in> on 2014/01/24 13:16:43 UTC

Re: How to convert characterRun.getColor() to RGB



MSB <markbrdsly <at> tiscali.co.uk> writes:

> 
> 
> Oh my, old age is really catching up with me now, I forgot about AbiWord
> until I was using a small notebook PC yesterday evening.
> 
> If you have not yet committed to a specific direction for this project, 
have
> a look at Abiword - http://www.abisource.com/. It is a small, free open
> source word processing package that can run under Windows, Linux, etc. 
Able
> to read and write Word documents (.doc only, not .docx yet) it can be used
> for document conversions. The most interesting aspect from your point of
> view may be that AbiWord can perform these conversion when run from the
> command line. This article explains it quite well -
> http://opensource.weblogsinc.com/2005/06/29/use-abiword-to-convert-
filetypes-on-the-command-line/
> 
> I do not now whether you need to download the AbiCommand plugin to support
> this sort of functionality but it would be easy ehough to test.
> 
> Zsolt Koppany wrote:
> > 
> > Hi,
> > 
> > I would like display a word document in html. Actually the code works 
> > more or less, I can even use font-names (using
> > characterRun.getFontName()).
> > 
> > What does "characterRun.getColor()" return? How can I convert it to RGB?
> > 
> > Zsolt
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe <at> poi.apache.org
> > For additional commands, e-mail: user-help <at> poi.apache.org
> > 
> > 
> > 
> 
Hii
The "characterRun.getColor()" returns an integer between 0 to 16.I also 
messed with this.I found one color table in the 
org.apache.poi.hwpf.usermodel.BorderCode. Am posting that color table here 
as i have tested this also.


 0	Auto
1	Black
2	Blue
3	Cyan
4	Green
5 	Magenta
6	Red
7	Yellow
8	White
9	DkBlue
10	DkCyan
11	DkGreen
12	DkMagenta
13	DkRed
14	DkYellow
15	DkGray
16	LtGray

if you find further enhancement please post.  Happy Coding :-)
------------------------------------------




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org