[ 
https://issues.apache.org/jira/browse/PDFBOX-5407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17517038#comment-17517038
 ] 

Michael Klink commented on PDFBOX-5407:
---------------------------------------

[~msahyoun],
{quote}
This is intented. Setting {{needAppearances(false)}} will skip generating the 
visual content of the field (the appearance).
{quote}

Hhmmm, the JavaDocs of {{PDAcroForm.setNeedAppearances(Boolean)}} claim that 
for {{false}} PDFBox *does generate the visual contents*:

{code:java}
    /**
     * Set the NeedAppearances value. If this is false, PDFBox will create 
appearances for all field
     * widget.
     * 
     * @param value the value for NeedAppearances
     */
    public void setNeedAppearances(Boolean value)
    {
        dictionary.setBoolean(COSName.NEED_APPEARANCES, value);
    }
{code}

And this makes sense, setting *NeedAppearances* to *false* in the *AcroForm* 
dictionary effectively tells the next PDF processor that all the widget 
appearances are there and up-to-date...

> Fields visible on click if NeedAppearances = false
> --------------------------------------------------
>
>                 Key: PDFBOX-5407
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5407
>             Project: PDFBox
>          Issue Type: Bug
>          Components: AcroForm, Rendering
>    Affects Versions: 2.0.24
>            Reporter: Dmitry Betanov
>            Priority: Minor
>              Labels: Appearance
>         Attachments: Main.java, input.pdf, invisible_fields.mov, output.pdf
>
>
> We have an issue that if we use NeedAppearances = false some of the input 
> field values only visible on click.
> This happens only on few viewers like in safari and MacOS default pdf viewer.
> The problem is that we cannot use NeedAppearances = true and similar issues 
> suggests to use it.
> Pdfbox version - 2.0.24, JDK - 11.
> Video shows an example of invisible values in MacOS default pdf viewer and 
> visible values in chrome.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to