You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Daniel Young <da...@gmail.com> on 2015/06/10 18:44:17 UTC

needsappearances flag

Hello,

Wondering if anyone can give an example of the proper way to set the
needsappearances flags on an acroForm? Currently, having an issue with PDF
fields filled with PFDBox, using setValue, not rendering in Chromes native
PDF viewer. I remember that this flag may help in that situation. Any help
either way is much appreciated.

Thanks.

Re: needsappearances flag

Posted by Happy Human <ha...@gmail.com>.
I'm having trouble reproducing in a PDF that I can share. I'll try some
more samples when time allows.

Thank you for the help.
-Dan

On Thu, Jun 11, 2015 at 12:02 PM, Maruan Sahyoun <sa...@fileaffairs.de>
wrote:

> could you share the form at a public location together with a sample how
> you set the field values?
>
> BR
> Maruan
>
> > Am 11.06.2015 um 18:29 schrieb Happy Human <ha...@gmail.com>:
> >
> > The issue I'm having seems to be related to fields having the same name,
> > where Acrobat will add # to the name.
> >
> > Foo#0
> > Foo#1
> >
> > These are set, but do not show up in some viewers (Chromes for sure) even
> > with NeedAppearances set. Wondering if this is a known issue or I'm doing
> > something incorrect?
> >
> > Thanks,
> > Dan
> >
> > On Thu, Jun 11, 2015 at 10:09 AM, Happy Human <ha...@gmail.com>
> > wrote:
> >
> >> I see it in version 2 (NeedAppearances).
> >>
> >> On Thu, Jun 11, 2015 at 10:04 AM, Happy Human <ha...@gmail.com>
> >> wrote:
> >>
> >>> Thank you for the reply. The version I'm using (1.8.9) does not have
> >>> COSName.NEED_APPEARANCES. What would the string value be for this
> COSName?
> >>>
> >>> Thanks again,
> >>> Dan
> >>>
> >>> On Thu, Jun 11, 2015 at 4:15 AM, Maruan Sahyoun <
> sahyoun@fileaffairs.de>
> >>> wrote:
> >>>
> >>>> Hi,
> >>>>> Am 10.06.2015 um 18:44 schrieb Daniel Young <
> >>>> danielyoung.private@gmail.com>:
> >>>>>
> >>>>> Hello,
> >>>>>
> >>>>> Wondering if anyone can give an example of the proper way to set the
> >>>>> needsappearances flags on an acroForm? Currently, having an issue
> with
> >>>> PDF
> >>>>> fields filled with PFDBox, using setValue, not rendering in Chromes
> >>>> native
> >>>>> PDF viewer. I remember that this flag may help in that situation. Any
> >>>> help
> >>>>> either way is much appreciated.
> >>>>
> >>>>
> >>>> for PDFBox 2. there is already a setter/getter within PDAcroForm. For
> >>>> PDFBox 1.8 you could do
> >>>>
> >>>> COSDictionary dictionary = PDAcroForm.getDictionary();
> >>>> dictionary.setBoolean(COSName.NEED_APPEARANCES, true);
> >>>>
> >>>> BR
> >>>> Maruan
> >>>>
> >>>>>
> >>>>> Thanks.
> >>>>
> >>>>
> >>>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
>

Re: needsappearances flag

Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
could you share the form at a public location together with a sample how you set the field values?

BR
Maruan

> Am 11.06.2015 um 18:29 schrieb Happy Human <ha...@gmail.com>:
> 
> The issue I'm having seems to be related to fields having the same name,
> where Acrobat will add # to the name.
> 
> Foo#0
> Foo#1
> 
> These are set, but do not show up in some viewers (Chromes for sure) even
> with NeedAppearances set. Wondering if this is a known issue or I'm doing
> something incorrect?
> 
> Thanks,
> Dan
> 
> On Thu, Jun 11, 2015 at 10:09 AM, Happy Human <ha...@gmail.com>
> wrote:
> 
>> I see it in version 2 (NeedAppearances).
>> 
>> On Thu, Jun 11, 2015 at 10:04 AM, Happy Human <ha...@gmail.com>
>> wrote:
>> 
>>> Thank you for the reply. The version I'm using (1.8.9) does not have
>>> COSName.NEED_APPEARANCES. What would the string value be for this COSName?
>>> 
>>> Thanks again,
>>> Dan
>>> 
>>> On Thu, Jun 11, 2015 at 4:15 AM, Maruan Sahyoun <sa...@fileaffairs.de>
>>> wrote:
>>> 
>>>> Hi,
>>>>> Am 10.06.2015 um 18:44 schrieb Daniel Young <
>>>> danielyoung.private@gmail.com>:
>>>>> 
>>>>> Hello,
>>>>> 
>>>>> Wondering if anyone can give an example of the proper way to set the
>>>>> needsappearances flags on an acroForm? Currently, having an issue with
>>>> PDF
>>>>> fields filled with PFDBox, using setValue, not rendering in Chromes
>>>> native
>>>>> PDF viewer. I remember that this flag may help in that situation. Any
>>>> help
>>>>> either way is much appreciated.
>>>> 
>>>> 
>>>> for PDFBox 2. there is already a setter/getter within PDAcroForm. For
>>>> PDFBox 1.8 you could do
>>>> 
>>>> COSDictionary dictionary = PDAcroForm.getDictionary();
>>>> dictionary.setBoolean(COSName.NEED_APPEARANCES, true);
>>>> 
>>>> BR
>>>> Maruan
>>>> 
>>>>> 
>>>>> Thanks.
>>>> 
>>>> 
>>> 
>> 


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


Re: needsappearances flag

Posted by Happy Human <ha...@gmail.com>.
The issue I'm having seems to be related to fields having the same name,
where Acrobat will add # to the name.

Foo#0
Foo#1

These are set, but do not show up in some viewers (Chromes for sure) even
with NeedAppearances set. Wondering if this is a known issue or I'm doing
something incorrect?

Thanks,
Dan

On Thu, Jun 11, 2015 at 10:09 AM, Happy Human <ha...@gmail.com>
wrote:

> I see it in version 2 (NeedAppearances).
>
> On Thu, Jun 11, 2015 at 10:04 AM, Happy Human <ha...@gmail.com>
> wrote:
>
>> Thank you for the reply. The version I'm using (1.8.9) does not have
>> COSName.NEED_APPEARANCES. What would the string value be for this COSName?
>>
>> Thanks again,
>> Dan
>>
>> On Thu, Jun 11, 2015 at 4:15 AM, Maruan Sahyoun <sa...@fileaffairs.de>
>> wrote:
>>
>>> Hi,
>>> > Am 10.06.2015 um 18:44 schrieb Daniel Young <
>>> danielyoung.private@gmail.com>:
>>> >
>>> > Hello,
>>> >
>>> > Wondering if anyone can give an example of the proper way to set the
>>> > needsappearances flags on an acroForm? Currently, having an issue with
>>> PDF
>>> > fields filled with PFDBox, using setValue, not rendering in Chromes
>>> native
>>> > PDF viewer. I remember that this flag may help in that situation. Any
>>> help
>>> > either way is much appreciated.
>>>
>>>
>>> for PDFBox 2. there is already a setter/getter within PDAcroForm. For
>>> PDFBox 1.8 you could do
>>>
>>> COSDictionary dictionary = PDAcroForm.getDictionary();
>>> dictionary.setBoolean(COSName.NEED_APPEARANCES, true);
>>>
>>> BR
>>> Maruan
>>>
>>> >
>>> > Thanks.
>>>
>>>
>>
>

Re: needsappearances flag

Posted by Happy Human <ha...@gmail.com>.
I see it in version 2 (NeedAppearances).

On Thu, Jun 11, 2015 at 10:04 AM, Happy Human <ha...@gmail.com>
wrote:

> Thank you for the reply. The version I'm using (1.8.9) does not have
> COSName.NEED_APPEARANCES. What would the string value be for this COSName?
>
> Thanks again,
> Dan
>
> On Thu, Jun 11, 2015 at 4:15 AM, Maruan Sahyoun <sa...@fileaffairs.de>
> wrote:
>
>> Hi,
>> > Am 10.06.2015 um 18:44 schrieb Daniel Young <
>> danielyoung.private@gmail.com>:
>> >
>> > Hello,
>> >
>> > Wondering if anyone can give an example of the proper way to set the
>> > needsappearances flags on an acroForm? Currently, having an issue with
>> PDF
>> > fields filled with PFDBox, using setValue, not rendering in Chromes
>> native
>> > PDF viewer. I remember that this flag may help in that situation. Any
>> help
>> > either way is much appreciated.
>>
>>
>> for PDFBox 2. there is already a setter/getter within PDAcroForm. For
>> PDFBox 1.8 you could do
>>
>> COSDictionary dictionary = PDAcroForm.getDictionary();
>> dictionary.setBoolean(COSName.NEED_APPEARANCES, true);
>>
>> BR
>> Maruan
>>
>> >
>> > Thanks.
>>
>>
>

Re: needsappearances flag

Posted by Happy Human <ha...@gmail.com>.
Thank you for the reply. The version I'm using (1.8.9) does not have
COSName.NEED_APPEARANCES. What would the string value be for this COSName?

Thanks again,
Dan

On Thu, Jun 11, 2015 at 4:15 AM, Maruan Sahyoun <sa...@fileaffairs.de>
wrote:

> Hi,
> > Am 10.06.2015 um 18:44 schrieb Daniel Young <
> danielyoung.private@gmail.com>:
> >
> > Hello,
> >
> > Wondering if anyone can give an example of the proper way to set the
> > needsappearances flags on an acroForm? Currently, having an issue with
> PDF
> > fields filled with PFDBox, using setValue, not rendering in Chromes
> native
> > PDF viewer. I remember that this flag may help in that situation. Any
> help
> > either way is much appreciated.
>
>
> for PDFBox 2. there is already a setter/getter within PDAcroForm. For
> PDFBox 1.8 you could do
>
> COSDictionary dictionary = PDAcroForm.getDictionary();
> dictionary.setBoolean(COSName.NEED_APPEARANCES, true);
>
> BR
> Maruan
>
> >
> > Thanks.
>
>

Re: needsappearances flag

Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
Hi,
> Am 10.06.2015 um 18:44 schrieb Daniel Young <da...@gmail.com>:
> 
> Hello,
> 
> Wondering if anyone can give an example of the proper way to set the
> needsappearances flags on an acroForm? Currently, having an issue with PDF
> fields filled with PFDBox, using setValue, not rendering in Chromes native
> PDF viewer. I remember that this flag may help in that situation. Any help
> either way is much appreciated.


for PDFBox 2. there is already a setter/getter within PDAcroForm. For PDFBox 1.8 you could do

COSDictionary dictionary = PDAcroForm.getDictionary();
dictionary.setBoolean(COSName.NEED_APPEARANCES, true);

BR
Maruan

> 
> Thanks.