LoadFromStream
Document management
Description
This function, only available in the Delphi versions of the library, allows a PDF document to be loaded from a TStream object. If the function succeeds, the loaded document will be selected and its DocumentID can be retrieved using the SelectedDocument function.
If the supplied password is rejected and OnPassword is assigned, the handler may provide another credential or cancel the load
Syntax
Delphi
Function TPDFlib.LoadFromStream(InStream: TStream; Const Password: WideString): Integer;
Parameters
| InStream | The TStream object containing the PDF document data |
|---|---|
| Password | The password to load the file |
Return values
| 0 | A PDF document could not be read from the stream. Use the LastErrorCode |
|---|---|
| 1 | A PDF document was successfully read from the stream. Use the SelectedDocument function to obtain the Document ID which can be used later to select this specific document. |