THotPDF.OpenLoadedStreamSourceSlice Method
Opens an independent read-only view over the original encoded bytes of an unfiltered loaded stream without materialising the stream
声明
function OpenLoadedStreamSourceSlice(AStream: THPDFStreamObject; out Slice: TStream): boolean;
单元
HPDFDoc
参数
| 名称 | 用途 |
|---|---|
AStream | Loaded stream object whose encoded source bytes are requested |
Slice | Receives a caller-owned independent read-only source slice |
返回值
Returns True when the stream is unfiltered, source-backed, and a slice was opened
使用说明
- The loaded stream must not have a Filter entry because the slice exposes encoded source bytes
- The returned stream owns its file handle and remains valid independently of later lazy-stream materialisation
- Pass the returned slice to
HPDFTransferStreamto write directly from its mapped file windows without an intermediate byte buffer - 调用方必须释放返回的流