GdPicture.NET.14
GdPicture14 Namespace / GdPicturePDF Class / LoadFromIStream Method
An IStream object. This object must be initialized before it can be sent into this method and it should remain open for subsequent use.





In This Topic
LoadFromIStream Method (GdPicturePDF)
In This Topic
Loads the PDF document from a previously instantiated IStream object according to what you have specified. The only supported file format for the input stream object is the PDF format.
Syntax
'Declaration
 
Public Function LoadFromIStream( _
   ByVal Stream As IStream _
) As GdPictureStatus
public GdPictureStatus LoadFromIStream( 
   IStream Stream
)
public function LoadFromIStream( 
    Stream: IStream
): GdPictureStatus; 
public function LoadFromIStream( 
   Stream : IStream
) : GdPictureStatus;
public: GdPictureStatus LoadFromIStream( 
   IStream* Stream
) 
public:
GdPictureStatus LoadFromIStream( 
   IStream^ Stream
) 

Parameters

Stream
An IStream object. This object must be initialized before it can be sent into this method and it should remain open for subsequent use.

Return Value

A member of the GdPictureStatus enumeration. If the method has been successfully followed, then the return value is GdPictureStatus.OK.

We strongly recommend always checking this status first.

Remarks
The origin's location and the measurement unit for any loaded document are reset to their default values: PdfOrigin.PdfOriginBottomLeft, PdfMeasurementUnit.PdfMeasurementUnitPoint.

The document's first page is automatically set as the current page after loading.

Sometimes a PDF document can be password protected. You can use the IsEncrypted method to determine if a PDF is encrypted or not. If it is encrypted, you should use the SetPassword method to decrypt it with the user or owner password.

Please note that the input stream should remain open and can only be closed/disposed of by the user after a call to the CloseDocument method is made.

Example
IStream is an interface, so you don't create an IStream object directly, you should rather implement this interface and then pass the required object. From that reason we don't add any example here.
See Also