Re: converting hex to PDColor

2017-03-13 Thread chitgoks
that worked. thank you very much On Mon, Mar 13, 2017 at 8:37 PM, chitgoks wrote: > thank you all for thebresponse > > i will try this out and confirm > > > On Mon, 13 Mar 2017 at 8:26 PM Lachezar Dobrev wrote: > >> Hmm... >> >> 1.

Re: converting hex to PDColor

2017-03-13 Thread chitgoks
thank you all for thebresponse i will try this out and confirm On Mon, 13 Mar 2017 at 8:26 PM Lachezar Dobrev wrote: > Hmm... > > 1. java.awt.Color.decode(colorStr); > 2. You're using integer division "rgb.getRed()/255" will yield 0 or > 1, which is then cast to

Re: converting hex to PDColor

2017-03-13 Thread Lachezar Dobrev
Hmm... 1. java.awt.Color.decode(colorStr); 2. You're using integer division "rgb.getRed()/255" will yield 0 or 1, which is then cast to float. Use "getRed()/255f" to get a float result. Your integer division code will only yield a red colour with #FF8000, which I suspect gets

Re: converting hex to PDColor

2017-03-13 Thread Andreas Lehmkühler
> chitgoks hat am 13. März 2017 um 11:27 geschrieben: > > > hi again > > a little assistance regarding converting hex to PDColor. > > please take this example #ff8000 > > and this is my code > > String colorStr = "#ff8000"; > java.awt.Color rgb = new java.awt.Color( >

converting hex to PDColor

2017-03-13 Thread chitgoks
hi again a little assistance regarding converting hex to PDColor. please take this example #ff8000 and this is my code String colorStr = "#ff8000"; java.awt.Color rgb = new java.awt.Color( Integer.valueOf(colorStr.substring(1, 3), 16),

Re: PDCheckbox setPartialName() and setMappingName() always the same

2017-03-13 Thread chitgoks
Please ignore this I set a unique value in setPartialName() instead of wanting PDFBox to automatically do the renaming. It works. On Mon, Mar 13, 2017 at 3:22 PM, chitgoks wrote: > hi > > i have a tiny issue with regards to a grouped PDCheckBox (2 checkboxes). > > if i set

PDCheckbox setPartialName() and setMappingName() always the same

2017-03-13 Thread chitgoks
hi i have a tiny issue with regards to a grouped PDCheckBox (2 checkboxes). if i set partial name and mapping name to say "cb1" the partial name should become cb11 while the other checkbox should be cb12 (COSName.T) while the mapping name will persist with cb1 (COSName.TM) however, this is

Re: indirect object

2017-03-13 Thread Tilman Hausherr
Am 13.03.2017 um 06:46 schrieb chitgoks: hi all i wish to find out how to get the indirect object's value e.g. 126 0 R so if a COSDictionary 's isDirect() is false, i would like to get that value but i cannot find which getter method to use You're confusing something there. A COSDictionary