* Get all objects in this stream. * * @returns Map of object number → parsed object
()
| 187 | * @returns Map of object number → parsed object |
| 188 | */ |
| 189 | getAllObjects(): Map<number, PdfObject> { |
| 190 | this.parse(); |
| 191 | |
| 192 | if (this.index === null) { |
| 193 | throw new ObjectParseError("Index not parsed"); |
| 194 | } |
| 195 | |
| 196 | const result = new Map<number, PdfObject>(); |
| 197 | |
| 198 | for (let i = 0; i < this.index.length; i++) { |
| 199 | const obj = this.getObject(i); |
| 200 | |
| 201 | if (obj !== null) { |
| 202 | result.set(this.index[i].objNum, obj); |
| 203 | } |
| 204 | } |
| 205 | |
| 206 | return result; |
| 207 | } |
| 208 | |
| 209 | /** |
| 210 | * Get the object number at a given index. |
no test coverage detected