LoadFromString
Document management
Description
Similar to the LoadFromFile function, except that the PDF document data is passed as a string. If the function succeeds, the loaded document is 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.LoadFromString(Const Source: AnsiString; Const Password: WideString): Integer;
DLL
int DLLoadFromString(int InstanceID, const char * Source, const wchar_t * Password);
Parameters
| Source | The source data to load the PDF document from |
|---|---|
| Password | The password to load the file |
Return values
| 0 | The PDF could not be loaded The PDF was loaded from the string successfully |
|---|---|
| 1 |
Remarks
PDF MAC-protected input is authenticated after password verification and before document pages are exposed