ImageGear .NET v25.2 - Updated
LoadPage(Stream,Int32) Method
Example 




ImageGear.Art Assembly > ImageGear.ART Namespace > ImGearART Class > LoadPage Method : LoadPage(Stream,Int32) Method
Stream from which to load marks. The LoadPage method works from the current stream position, so if you are indexing pages from the beginning of the multi-page annotations file, you need to reset the stream position to the beginning.
Zero-based page number. First page is 0.
Loads ART marks from a stream.
Syntax
'Declaration
 
Public Overloads Shared Function LoadPage( _
   ByVal stream As Stream, _
   ByVal pageNumber As Integer _
) As ImGearARTPage
'Usage
 
Dim stream As Stream
Dim pageNumber As Integer
Dim value As ImGearARTPage
 
value = ImGearART.LoadPage(stream, pageNumber)
public static ImGearARTPage LoadPage( 
   Stream stream,
   int pageNumber
)
public: static ImGearARTPage* LoadPage( 
   Stream* stream,
   int pageNumber
) 
public:
static ImGearARTPage^ LoadPage( 
   Stream^ stream,
   int pageNumber
) 

Parameters

stream
Stream from which to load marks. The LoadPage method works from the current stream position, so if you are indexing pages from the beginning of the multi-page annotations file, you need to reset the stream position to the beginning.
pageNumber
Zero-based page number. First page is 0.

Return Value

Remarks
This method loads annotation marks from an XML stream. If the XML stream contains syntax errors ART page will not be loaded and method returns null. In case of semantic errors see the description of specific mark class.

This method can also be used to load ART 2.0 marks from the binary ART format.

Example
// Load first page of ART data from an ART file.
ImGearARTPage igARTPageNew;
using (FileStream localFile = new FileStream("test.xml", FileMode.Open))
    igARTPageNew = ImGearART.LoadPage(localFile, 0);
// Update display with new page.
igPageView.Display.ARTPage = igARTPageNew;
' Load first page of ART data from an ART file.
Dim igARTPageNew As ImGearARTPage
Using localFile As New FileStream("test.xml", FileMode.Open)
    igARTPageNew = ImGearART.LoadPage(localFile, 0)
End Using
' Update display with new page.
igPageView.Display.ARTPage = igARTPageNew
See Also

Reference

ImGearART Class
ImGearART Members
Overload List
ImGearARTPage Class

Is this page helpful?
Yes No
Thanks for your feedback.