# PDF.js Express showing hidden from fields?

**URL:** <https://pdfjs.community/t/pdf-js-express-showing-hidden-from-fields/1026>\
**Category:** Technical Support\
**Tags:** pdfjs-express\
**Created:** [October 5, 2021, 5:50pm UTC](https://pdfjs.community/t/pdf-js-express-showing-hidden-from-fields/1026 "2021-10-05T17:50:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![GMacAussie](https://avatars.discourse-cdn.com/v4/letter/g/a88e4f/32.png) [@GMacAussie](https://pdfjs.community/u/GMacAussie)\
**Post date:** [October 5, 2021, 5:50pm UTC](https://pdfjs.community/t/pdf-js-express-showing-hidden-from-fields/1026/1 "2021-10-05T17:50:58Z")

</div>

We are evaluating PDF.js Express and have seen some strange handling of hidden form fields - that is, they are initially visible, and we cannot discern from the widget it is in fact hidden, but we are not sure if it is because we don’t understand the API.

**PDF.js Express Version**  
8.1.0

**Detailed description of issue**  
For reference, we are using the PDFTron doc\_to\_sign.pdf used in the PDFTron viewer demo. This has a few hidden radio buttons.

When viewing in PDFTron demo, or say the latest version of Firefox/Chrome, or using PDF.js directly, these hidden fields are not visible.

The PDF.js Express demo itself also shows these fields.

We have inspected the annotations returned from the AnnotationManager, and the hidden/Hidden field is always false, so it appears this flag is not loaded correctly, or we have missed something basic such as not looking in the correct place.

**Expected behaviour**

 ![ff-pdf](https://canada1.discourse-cdn.com/flex031/uploads/pdfjscommunity/original/1X/f78c1d3d2cb43e7cf373156633d7a11019cd4efd.png)

**Does your issue happen with every document, or just one?**  
We have tried creating a simple document with a hidden radio button in Foxit Editor, and the hidden field is still visible. The assumption is that hidden fields in all documents are visible.

**Link to document**  
[doc\_to\_sign-original.pdf](https://pdfjs.community/uploads/short-url/xSAbnXnewfQNqDCnSRj53hDqPPH.pdf) (94.3 KB)

**Code snippet**

```javascript
            (<any>window).WebViewer({
                path: 'Scripts/pdfjs-express',
                initialDoc: 'PDFs/doc_to_sign-original.pdf'
            }, document.getElementById('pdf-viewer'))
                .then(function (instance) {
                    var docViewer = instance.docViewer;
                    var annotManager = instance.annotManager;

                    docViewer.addEventListener('annotationsLoaded', function () {
                        var annots = annotManager.getAnnotationsList();

                        for (var ix = 0; ix < annots.length; ix++) {
                            if (annots[ix].hidden || !annots[ix].isVisible()) {
                                console.log(`Field ${annots[ix].fieldName} is hidden`);
                            }
                        }
                    });
                });

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex031/uploads/pdfjscommunity/original/1X/ffbcd25c7d423db8d5acd5db201c272f4db306dd.png) [@system](https://pdfjs.community/u/system)\
**Post date:** [October 5, 2021, 5:51pm UTC](https://pdfjs.community/t/pdf-js-express-showing-hidden-from-fields/1026/2 "2021-10-05T17:51:03Z")

</div>

**Hello, I’m Ron, an automated tech support bot 🤖**

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:
- [Import & export annotations](https://pdfjs.express/documentation/annotation/import-export/overview)
- [Best practices for PDF.js Express - Load documents with loadDocument](https://pdfjs.express/documentation/learn-more/best-practices#load-documents-with-loaddocument)
- [Migrating from PDF.js Express to PDFTron - 3. Remove PDF.js Express Modules](https://pdfjs.express/documentation/learn-more/pdfjs-express-to-pdftron.8#3.-remove-pdf.js-express-modules)

APIs:
- [Core.Document - getDownloadLink( [options])](https://pdfjs.express/api/Core.Document.html#getDownloadLink__anchor)
- [PDF.js Express Utilities](https://pdfjs.express/api/utils/index.html#__anchor)
- [ExpressUtils(optionsopt) - # async set() → {Promise.}](https://pdfjs.express/api/utils/ExpressUtils.html#set__anchor)

Forums:
- [Pdf js viewer throwing error on Firefox](https://pdfjs.community/t/pdf-js-viewer-throwing-error-on-firefox/429/1)
- [Is it possible to partial rendering of pdf file?](https://pdfjs.community/t/is-it-possible-to-partial-rendering-of-pdf-file/372/3)
- [How to merge signature annotation with PDF document](https://pdfjs.community/t/how-to-merge-signature-annotation-with-pdf-document/558/2)

---

<div class="post-metadata">

**Author:** ![Logan](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/logan/32/13_2.png) [@Logan](https://pdfjs.community/u/Logan)\
**Post date:** [October 6, 2021, 5:15pm UTC](https://pdfjs.community/t/pdf-js-express-showing-hidden-from-fields/1026/3 "2021-10-06T17:15:11Z")

</div>

Hey there!

Thanks for the detailed bug report - I will investigate this shortly and get back to you soon.

Logan

---

<div class="post-metadata">

**Author:** ![Logan](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/logan/32/13_2.png) [@Logan](https://pdfjs.community/u/Logan)\
**Post date:** [October 13, 2021, 8:36pm UTC](https://pdfjs.community/t/pdf-js-express-showing-hidden-from-fields/1026/4 "2021-10-13T20:36:48Z")

</div>

Hey there!

I found a fix and its just in code review right now. Fix will be included in the next release, probably some time next week (keep an eye out in #announcements )

Thanks!  
Logan

---

<div class="post-metadata">

**Author:** ![Logan](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/logan/32/13_2.png) [@Logan](https://pdfjs.community/u/Logan)\
**Post date:** [October 13, 2021, 8:36pm UTC](https://pdfjs.community/t/pdf-js-express-showing-hidden-from-fields/1026/5 "2021-10-13T20:36:50Z")

</div>


