SavePageRangeTextToStream
Text and extraction
Description
Writes UTF-8 text from the requested pages directly to a stream without buffering the complete document text
Syntax
Function TPDFlib.SavePageRangeTextToStream(Const PageRange: WideString; ExtractOptions: Integer; Const PageSeparator: WideString; Target: TStream): Integer;Parameters
| PageRange | One-based page-range expression such as 1-3,7; an empty value selects every page |
|---|---|
| ExtractOptions | Text extraction option from 0 to 11, as documented for GetPageText; values outside that range reject the call |
| PageSeparator | Text inserted between consecutive pages and encoded as UTF-8; empty writes pages back to back |
| Target | Destination stream; writing starts at its current position and no UTF-8 byte-order mark is emitted |
Return values
Returns the number of pages written, or zero when the arguments or page range are invalid
Remarks
Output starts at the current stream position and does not include a UTF-8 byte-order mark