Attach (recommended) or Link to PDF file here:

Configuration:
- Web browser and its version: Chrome 91.0.4472.124
- Operating system and its version: Win 10
- PDF.js version: 2.8.335
- Is a browser extension: Nope.

I'm trying to list and extract data form each element of a form created in a PDF file.
I have some image elements detected as Btn (button) and without any indice about the image.

`const items = await pdfPage.getAnnotations();

for (const item of items) {

    // With 'TestImage' as the name of one on my image elements
    if (item.fieldName === 'TestImage') {
        console.log('TestImage', item);
    }
}`

Gives:

TestImage 
{annotationFlags: 4, borderStyle: {…}, color: Uint8ClampedArray(3), contents: "", hasAppearance: true, …}
actions: {Action: Array(1)}
alternativeText: ""
annotationFlags: 4
annotationType: 20
borderStyle:
    dashArray: [3]
    horizontalCornerRadius: 0
    style: 1
    verticalCornerRadius: 0
    width: 0
checkBox: false
color: 
Uint8ClampedArray(3) 
[0, 0, 0]
contents: ""
defaultAppearanceData:
    fontColor: Uint8ClampedArray(3) [0, 0, 0]
    fontName: "HeBo"
    fontSize: 12
defaultFieldValue: null
fieldFlags: 65536
**fieldName: "TestImage"**
**fieldType: "Btn"**
fieldValue: null
hasAppearance: true
hidden: false
id: "57R"
isTooltipOnly: false
modificationDate: null
pushButton: true
radioButton: false
readOnly: false
rect: (4) [383.563, 623.486, 527.808, 744.176]
subtype: "Widget"

Any idea?

In front of that, I'm able to get images from regular image fields (out of Forms) without any context (the  location and the size used in the PDF):


```
// Potential image types
const imagesObjectsTypes = [
    pdfjsLib.OPS.paintImageMaskXObject,
    pdfjsLib.OPS.paintImageMaskXObjectGroup,
    pdfjsLib.OPS.paintImageXObject, // <- 85
    pdfjsLib.OPS.paintInlineImageXObject,
    pdfjsLib.OPS.paintInlineImageXObjectGroup,
    pdfjsLib.OPS.paintImageXObjectRepeat,
    pdfjsLib.OPS.paintImageMaskXObjectRepeat,   
];

const operatorsList = await pdfPage.getOperatorList();

for (let i = 0; i < operatorsList.fnArray.length; i++) {

    const type = operatorsList.fnArray[i];

    if (imagesObjectsTypes.indexOf(type) >= 0) {

        const image = pdfPage.objs.get(operatorsList.argsArray[i][0]);

        console.log('Image detected:')
        console.log(image);
        console.log(operatorsList.argsArray[i]);
    }
}

```
Gives

Image detected:
width: 1067,
height: 600,
kind: 2, data: Uint8ClampedArray(1920600)} data: Uint8ClampedArray(1920600) [ …],
height: 600,
kind: 2,
width: 1067,

0: "img_p0_3"
1: 1067
2: 600

Thank you :)





pdfManagerMock,
        idFactoryMock
      
      expect(data.annotationType).toEqual(AnnotationType.WIDGET
      expect(data.checkBox).toEqual(true
      expect(data.fieldValue).toEqual("1"
      expect(data.defaultFieldValue).toEqual("2"
      expect(data.radioButton).toEqual(false
    }
    it("should handle checkboxes without /Off appearance", async function () {
      buttonWidgetDict.set("V", Name.get("1")
      buttonWidgetDict.set("DV", Name.get("2")
      const appearanceStatesDict = new Dict(
      const normalAppearanceDict = new Dict(
      normalAppearanceDict.set("Checked", 1
      appearanceStatesDict.set("N", normalAppearanceDict
      buttonWidgetDict.set("AP", appearanceStatesDict
      const buttonWidgetRef = Ref.get(124, 0
      const xref = new XRefMock([
        { ref: buttonWidgetRef, data: buttonWidgetDict },
      ]
      const { data } = await AnnotationFactory.create(
        xref,
        buttonWidgetRef,
        pdfManagerMock,
        idFactoryMock
      
      expect(data.annotationType).toEqual(AnnotationType.WIDGET
      expect(data.checkBox).toEqual(true
      expect(data.fieldValue).toEqual("1"