THotPDF.LoadFromStream

THotPDF

 

Top  Previous  Next

Loads an existing PDF file from stream.

 

Delphi syntax:

function LoadFromStream ( DocStream: TStream ): Integer;

function LoadFromStream ( DocStream: TStream; const Password: AnsiString ): Integer;

 

C++ syntax:

int __fastcall LoadFromStream ( Classes::TStream* DocStream );

int __fastcall LoadFromStream ( Classes::TStream* DocStream, System::AnsiString Password );

 

Description

Call  LoadFromStream to load an existing PDF document from stream. Function LoadFromStream returns count of pages in the loaded document.

Use the password overload for RC4-40 or RC4-128 Standard encrypted PDFs. HotPDF validates the user or owner password, decrypts loaded strings and streams in memory, clears the loaded encryption state, and lets SaveLoadedDocument write an unencrypted copy. Unsupported encryption revisions raise an exception.

When importing existing PDF objects, HotPDF decodes ISO 32000-1 PDF name #XX escape sequences before storing name values internally. Names such as /PANTONE#20216#20CVC, /lime#20Green, and /The_Key_of_F#23_Minor are preserved as their intended byte values when the document is later copied or saved.

 

 

 

See also: LoadFromFile, DecryptLoadedDocument