LEADTOOLS OCR (Leadtools.Forms.Ocr assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.29
ExportPages(Int32,Int32) Method
See Also 
Leadtools.Forms.Ocr Namespace > IOcrPageCollection Interface > ExportPages Method : ExportPages(Int32,Int32) Method



firstPageIndex
The zero-based index of the first page to export.
lastPageIndex
The zero-based index of the last page to export. A value of -1 means export up to and including the last page in the OCR document.

The ExportPages(Int32,Int32) Method is available as an add-on to the LEADTOOLS Document and Medical Imaging toolkits.

firstPageIndex
The zero-based index of the first page to export.
lastPageIndex
The zero-based index of the last page to export. A value of -1 means export up to and including the last page in the OCR document.
Export one or more pages at the specified index to a multi-page Leadtools.RasterImage object.

Syntax

Visual Basic (Declaration) 
Overloads Function ExportPages( _
   ByVal firstPageIndex As Integer, _
   ByVal lastPageIndex As Integer _
) As RasterImage
Visual Basic (Usage)Copy Code
Dim instance As IOcrPageCollection
Dim firstPageIndex As Integer
Dim lastPageIndex As Integer
Dim value As RasterImage
 
value = instance.ExportPages(firstPageIndex, lastPageIndex)
C# 
RasterImage ExportPages( 
   int firstPageIndex,
   int lastPageIndex
)
C++/CLI 
RasterImage^ ExportPages( 
   int firstPageIndex,
   int lastPageIndex
) 

Parameters

firstPageIndex
The zero-based index of the first page to export.
lastPageIndex
The zero-based index of the last page to export. A value of -1 means export up to and including the last page in the OCR document.

Return Value

A Leadtools.RasterImage object containing a copy of the image data of the specified page or pages.

Example

This example will add a few pages to an OCR document before exporting it back and saving it to disk as a multi-page TIF file.

Remarks

This method copies the image data to the created Leadtools.RasterImage object image. Therefore, after this method returns, there is no relationship between the returned value and the IOcrPage objects inside the OCR document. The returned Leadtools.RasterImage object will need to be disposed.

To export a single page to a Leadtools.RasterImage object, use ExportPage(int pageIndex).

A short-cut to export all the pages in the OCR document to a multi-page Leadtools.RasterImage object is ExportPages(1, -1).

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7

See Also

ExportPages(Int32,Int32) requires an OCR module license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features