LoadFromStream Method

[Top]  [Chapter]  [Previous]  [Next]

Applies to

IWPTextObj

Declaration

function LoadFromStream(const FileExt: WideString; const Stream: IUnknown): WordBool;

Description

This method loads the contents of this object from a IStream or IWPStream. This is method is used to load image data into image objects. .NET: The stream converter Stream2WPStream must be re-created for each load and save operation!

 

Example:

System.IO.Stream str = new System.IO.MemoryStream();

// ... load data into "str" ... and then load it into the object

wpdllint1.Memo.CurrObj.LoadFromStream("PNG", new WPDynamic.Stream2WPStream(str));

 

Parameters

FileExt

This is the extension string to describe the data format, for example JPG, EMF or BMP. When you use this method to load data into an PDF attachment container (_SetObjType) use a specify a filename.

Stream

This is a reference to an IStream or IWPStream interface.

Note: When working with a placeholder object which embeds data into a PDF file (See InputEmbeddedData) this method updates the embedded data, not the image! In this case the file may be in RTF, C# and various other formats!

Category

Load and Save


[idh_iwptextobj_loadfromstream.htm]    Copyright © 2007 by WPCubed GmbH