pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tilman Hausherr <THaush...@t-online.de>
Subject Re: CheckList
Date Thu, 17 Aug 2017 19:59:42 GMT
Sorry about that. I see now that the appearance stream must be changed 
as well, by using the ZapfDingbats font. An example of this can be found 
here:

https://www.ghostscript.com/doc/examples/annots.pdf

See last page, "cb1" at Root/Pages/Kids/[5]/Annots/[14]/AP/N/Yes . The 
resources has the font, and the normal appearance for "Yes" is

1 g
0 0 45.3616 45.3616 re
f
0 G
1 w
0.5 0.5 44.3616 44.3616 re
s
q
   1 1 43.3616 43.3616 re
   W
   n
   BT
     /ZaDb 42.8906 Tf
     0 g
     1 0 0 1 4.5382 7.2617 Tm
     (4) Tj
   ET
Q


The numbers depend of the size of your checkbox. The best would be to 
create it with Adobe Professional first and analyse it with PDFDebugger 
so that you see what belongs into it.

To add the font to the resources:

         PDResources resources = new PDResources();
         resources.put(COSName.getPDFName("ZaDb"), 
PDType1Font.ZAPF_DINGBATS);
         yesNStream.setItem(COSName.RESOURCES, resources );


Tilman


Am 17.08.2017 um 20:28 schrieb Bharat Bhatt:
> I tried but still appering as X
>
> On Thu, Aug 17, 2017 at 11:43 PM, Tilman Hausherr <THausherr@t-online.de>
> wrote:
>
>> Am 17.08.2017 um 20:07 schrieb Bharat Bhatt:
>>
>>> Thanks a lot for quick response.
>>> I checked that example but seletion is apreaing as X but I required as
>>> check sign.
>>>
>> There's a comment "|4 is checkmark", please try that.
>>
>>
>> |
>>
>>> Is there any other way to create without so much string combination?
>>>
>> You could delete the parts with the appearance, but then it would only
>> work with Adobe Reader and not with some other viewers.
>>
>> And yes, it's that complex. Maybe in some far away future this will be
>> improved.
>>
>> Tilman
>>
>>
>>
>>
>>> Thanks,
>>> Bharat
>>>
>>> On Thu, Aug 17, 2017 at 10:04 PM, Tilman Hausherr <THausherr@t-online.de>
>>> wrote:
>>>
>>> https://stackoverflow.com/questions/43343232/how-to-add-a-
>>>> border-to-a-checkbox-and-make-it-always-visible
>>>>
>>>> Tilman
>>>>
>>>>
>>>>
>>>> Am 17.08.2017 um 18:31 schrieb Bharat Bhatt:
>>>>
>>>> I required only group of checkboxs. Do you have any example which I can
>>>>> refere?.
>>>>>
>>>>> Thanks.
>>>>> Bharat
>>>>>
>>>>> On Thu, Aug 17, 2017 at 9:53 PM, Tilman Hausherr <THausherr@t-online.de
>>>>> wrote:
>>>>>
>>>>> It's the same as creating one single checkbox. Just several of them.
Or
>>>>> do
>>>>>
>>>>>> you mean one checkbox with several widgets, so that if you click
one of
>>>>>> them, then all of them change in Adobe Reader?
>>>>>>
>>>>>> Tilman
>>>>>>
>>>>>>
>>>>>> Am 17.08.2017 um 18:16 schrieb Bharat Bhatt:
>>>>>>
>>>>>> Series of checkboxes
>>>>>>
>>>>>>> On Thu, Aug 17, 2017 at 9:06 PM, Tilman Hausherr <
>>>>>>> THausherr@t-online.de
>>>>>>> wrote:
>>>>>>>
>>>>>>> Do you mean a series of checkboxes, or a multiselect listbox?
>>>>>>>
>>>>>>> Tilman
>>>>>>>>
>>>>>>>>
>>>>>>>> Am 17.08.2017 um 12:36 schrieb Bharat Bhatt:
>>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> How to create Check List wtih mutiple option can be selected?
>>>>>>>>> Thanks,
>>>>>>>>> Bharat
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ------------------------------------------------------------
>>>>>>>>> ---------
>>>>>>>>>
>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>>>>>>>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> ------------------------------------------------------------
>>>>>>>> ---------
>>>>>>>>
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>>>>>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>>>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>>>
>>>>
>>>>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Mime
View raw message