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 :)





*   for environments without Fetch API or `XMLHttpRequest` support, such as
 *   Node.js. The default value is {DOMStandardFontDataFactory}.
 * @property {boolean} [useWorkerFetch] - Enable using the Fetch API in the
 *   worker-thread when reading CMap and standard font files. When `true`,
 *   the `CMapReaderFactory` and `StandardFontDataFactory` options are ignored.
 *   The default value is `true` in web environments and `false` in Node.js.
 * @property {boolean} [stopAtErrors] - Reject certain promises, e.g.
 *   `getOperatorList`, `getTextContent`, and `RenderTask`, when the associated
 *   PDF data cannot be successfully parsed, instead of attempting to recover
 *   whatever possible of the data. The default value is `false`.
 * @property {number} [maxImageSize] - The maximum allowed image size in total
 *   pixels, i.e. width * height. Images above this value will not be rendered.
 *   Use -1 for no limit, which is also the default value.
 * @property {boolean} [isEvalSupported] - Determines if we can evaluate strings
 *   as JavaScript. Primarily used to improve performance of font rendering, and
 *   when parsing PDF functions. The default value is `true`.
 * @property {boolean} [disableFontFace] - By default fonts are converted to
 *   OpenType fonts and loaded via the Font Loading API or `@font-face` rules.
 *   If disabled, fonts will be rendered using a built-in font renderer that
 *   constructs the glyphs with primitive path commands.
 *   The default value is `false` in web environments and `true` in Node.js.
 * @property {boolean} [fontExtraProperties] - Include additional properties,
 *   which are unused during rendering of PDF documents, when exporting the
 *   parsed font data from the worker-thread. This may be useful for debugging
 *   purposes (and backwards compatibility), but note that it will lead to
 *   increased memory usage. The default value is `false`.
 * @property {boolean} [enableXfa] - Render Xfa forms if any.
 *   The default value is `false`.
 * @property {HTMLDocument} [ownerDocument] - Specify an explicit document
 *   context to create elements with and to load resources, such as fonts,