* Parse the full object (including streams) at the given byte offset. * Used for object stream parsing where we need the stream data.
(offset: number, objNum: number, genNum: number)
| 417 | * Used for object stream parsing where we need the stream data. |
| 418 | */ |
| 419 | private parseFullObjectAt(offset: number, objNum: number, genNum: number): PdfStream | null { |
| 420 | try { |
| 421 | const parser = new IndirectObjectParser(this.scanner); |
| 422 | const result = parser.parseObjectAt(offset); |
| 423 | |
| 424 | if (result.value instanceof PdfStream) { |
| 425 | return result.value; |
| 426 | } |
| 427 | |
| 428 | return null; |
| 429 | } catch (error) { |
| 430 | const message = error instanceof Error ? error.message : String(error); |
| 431 | this.warnings.push(`Failed to parse object ${objNum} ${genNum} as stream: ${message}`); |
| 432 | return null; |
| 433 | } |
| 434 | } |
| 435 | |
| 436 | /** |
| 437 | * Find object streams among the scanned entries and extract their contents. |
no test coverage detected