Gets or sets a value that indicates whether RasterCodecs should try to load all the pages of a file by default.
public bool AllPages { get; set; }
Public Property AllPages As Boolean
public bool AllPages {get; set;}
@property (nonatomic, assign) BOOL allPages
public boolean getAllPages()
public void setAllPages(boolean value)
<br/>get_AllPages();<br/>set_AllPages(value);<br/>Object.defineProperty('AllPages');
true to load all the pages of a file by default; otherwise, false. Default value is false.
This option controls how the RasterCodecs load methods that do not take a first and last page number parameters load the RasterImage.
For example, the RasterCodecs.Load(string fileName) method will try to load all the pages of the file when the value of AllPages is true. This is the equivalent of calling this method:
rasterImage = RasterCodecs.Load(
fileName, // File Name
0, // bitsPerPixel
CodecsLoadByteOrder.BgrOrGray, // order
1, // firstPage
-1) // lastPage (load all)
If the file format supports and contains multiple pages, the result RasterImage object will contain all the pages of the file.
Calling RasterCodecs.Load(string fileName) with AllPages set to false is the equivalent of calling this method:
rasterImage = RasterCodecs.Load(
fileName, // File Name
0, // bitsPerPixel
CodecsLoadByteOrder.BgrOrGray, // order
1, // firstPage
1) // lastPage (just the first page of the file)
Even if the file format supports and contains multiple pages, the result RasterImage object will contain only one page (the first page) of the file.
Important: When RasterCodecs tries to load a file, it does not have initially any information about that (if it supports multiple pages, the number of pages to load), and hence, it will try to obtain this information from the file prior to loading it. Hence, calling any of the methods affected with the AllPages option set to true will result in slower loading time if all you need is load the first page of an image file.
Therefore, AllPages will be set to false in future versions of LEADTOOLS to speed up the default load operations. If you want to keep the old behavior, then you can either set the AllPages value back to true manually prior to calling any of the above methods or use any of the overload versions that accept a first and last page number parameters.
Methods affected by AllPages:
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET