←Select platform

GetTotalPagesAsync Method

Summary
Gets the number of pages in a stream.
Syntax
C#
VB
Objective-C
C++
public IAsyncOperation<int> GetTotalPagesAsync(  
   ILeadStream stream 
) 
Public Function GetTotalPagesAsync( _ 
   ByVal stream As ILeadStream _ 
) As IAsyncOperation(Of Integer) 
- (void)totalPagesInStreamAsync:(LTLeadStream *)stream  
                     completion:(void (^)(NSInteger totalPages, NSError * __nullable error))completion 
public: 
IAsyncOperation<int>^ GetTotalPagesAsync(  
   ILeadStream^ stream 
)  

Parameters

stream
A ILeadStream containing the image data to query.

Return Value

Number of pages in the specified stream.

Remarks

NOTE: This topic is part of RasterCodecs Async support using the .NET System.ComponentMode.AsyncOperation model. For .NET async/await, use Task<CodecsImageInfo> GetInformationAsync(ILeadStream stream, bool totalPages).

GetInformationAsync and GetFormatAsync use GetInformationAsync internally. So, if more information about the image is required, it is recommended to call GetInformationAsync directly and obtain the data once.

Example

For an example, refer to Load(Stream stream, int pageNumber).

Requirements

Target Platforms

Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Codecs Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.