You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by chitgoks <ch...@gmail.com> on 2017/03/13 07:22:25 UTC

PDCheckbox setPartialName() and setMappingName() always the same

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 not the case, hence will result in the checkbox acting
like a grouped radio button (cannot select both checkboxes) because both
COSName.T and COSName.TM have the same values.

Am I missing some method to call in order to make it behave like this?

iText and Aspose both automatically rename its COSName.T value (not
comparing libraries here but trying to understand how it works in PDFBox),
so in PDFBox, do I have to call some other method? if so, which one?

please advise

thank you

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

Posted by chitgoks <ch...@gmail.com>.
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 <ch...@gmail.com> wrote:

> 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 not the case, hence will result in the checkbox acting
> like a grouped radio button (cannot select both checkboxes) because both
> COSName.T and COSName.TM have the same values.
>
> Am I missing some method to call in order to make it behave like this?
>
> iText and Aspose both automatically rename its COSName.T value (not
> comparing libraries here but trying to understand how it works in PDFBox),
> so in PDFBox, do I have to call some other method? if so, which one?
>
> please advise
>
> thank you
>
>