Interface IPage
Represents a scanned or imported Page within a Batch in the ImageTrust system.
Note: Write-access to properties depends on the context in which the model is used. When in a read-only context, set* methods will throw an UnmodifiableException.
Inheritance
Properties list
Inherited Properties
Methods list
Inherited Methods
Properties
barcodeData
see
Declaration
readonly barcodeData: IBarcodeData[];
Property Value
| Type | Description |
|---|---|
| IBarcodeData[] |
dpiX
see ,
Declaration
dpiX: number;
Property Value
| Type | Description |
|---|---|
| number |
dpiY
see ,
Declaration
dpiY: number;
Property Value
| Type | Description |
|---|---|
| number |
eDoc
see
Declaration
readonly eDoc: boolean;
Property Value
| Type | Description |
|---|---|
| boolean |
encrypted
see
Declaration
readonly encrypted: boolean;
Property Value
| Type | Description |
|---|---|
| boolean |
fileName
see
Declaration
readonly fileName: string;
Property Value
| Type | Description |
|---|---|
| string |
handle
see
Declaration
readonly handle: string;
Property Value
| Type | Description |
|---|---|
| string |
imageColorMode
see
Declaration
readonly imageColorMode: ImageColorMode;
Property Value
| Type | Description |
|---|---|
| ImageColorMode |
imageHeight
see
Declaration
readonly imageHeight: number;
Property Value
| Type | Description |
|---|---|
| number |
imageWidth
see
Declaration
readonly imageWidth: number;
Property Value
| Type | Description |
|---|---|
| number |
originalFileName
see
Declaration
readonly originalFileName: any;
Property Value
| Type | Description |
|---|---|
| any |
originalFilePath
see
Declaration
readonly originalFilePath: string;
Property Value
| Type | Description |
|---|---|
| string |
physicalHeight
see
Declaration
readonly physicalHeight: number;
Property Value
| Type | Description |
|---|---|
| number |
physicalWidth
see
Declaration
readonly physicalWidth: number;
Property Value
| Type | Description |
|---|---|
| number |
side
see
Declaration
readonly side: IPage.Side;
Property Value
| Type | Description |
|---|---|
| IPage.Side |
title
see
Declaration
readonly title: string;
Property Value
| Type | Description |
|---|---|
| string |
Methods
awaitRendition()
Returns a promise that will complete once this page's respective image thumbnail rendition becomes available to the client. Any rendition will do, independent of the size.
Declaration
awaitRendition(): Promise<void>;
Returns
| Type | Description |
|---|---|
| Promise<void> |
awaitUpload()
Returns a promise that will complete once this page's resource has finished uploading to the server. The promise will resolve, as true if the image uploaded successfully and as false if it didn't.
Declaration
awaitUpload(): Promise<boolean>;
Returns
| Type | Description |
|---|---|
| Promise<boolean> |
detectBarcodes(barcodeTypes)
Returns a Promise object which asynchronously invokes the Barcode detection engine on the Page, for the given Barcode types. If the detection for a given Barcode type has already taken place, then it is not repeated. This method cannot be called while executing on server.
**NOTE:** This method returns immediately with a Promise object which at that moment does not have any defined value (undefined). The value will be available when the process has been completed and the Promise has been resolved. Use the then() and catch() methods of the returned Promise object in order to run any code after the result becomes available.
Declaration
detectBarcodes(barcodeTypes: Set<BarcodeType>): Promise<void>;
Parameters
| Type | Name | Description |
|---|---|---|
| Set<BarcodeType> | barcodeTypes |
A Set of Barcode types that the detection engine should search for. |
Returns
| Type | Description |
|---|---|
| Promise<void> |
detectFormTypeBarcodes()
Returns a Promise object which asynchronously invokes the Barcode detection engine on the Page, for the Barcode types which are linked to the assigned Form Type. The Document where the Page belongs, must have an assigned Form Type and the Form Type must have a Recognition Profile with one or more Barcode types.
If the detection for a certain Barcode type has already taken place, then it is not repeated.
This method cannot be called while executing on server.
**NOTE:** This method returns immediately with a Promise object which at that moment does not have any defined value (undefined). The value will be available when the process has been completed and the Promise has been resolved. Use the then() and catch() methods of the returned Promise object in order to run any code after the result becomes available.
Declaration
detectFormTypeBarcodes(): Promise<void>;
Returns
| Type | Description |
|---|---|
| Promise<void> |
detectIsBlank(blackToWhitePixelPerc)
Returns a Promise object which asynchronously will set the blank property of the page if there are less than blackPixelsPercent black pixels (the method returns the value of the blank property.
Calling this method will re-calculate this property. Before calling the method you should first call this one to make sure that the property has been set.
If there is a blank-page separation on the job, then this property is calculated during the application of the separation rules.
**NOTE:** This method returns immediately with a Promise object which at that moment does not have any defined value (undefined). The value will be available when the process has been completed and the Promise has been resolved. Use the then() and catch() methods of the returned Promise object in order to run any code after the result becomes available.
Declaration
detectIsBlank(blackToWhitePixelPerc: number): Promise<boolean>;
Parameters
| Type | Name | Description |
|---|---|---|
| number | blackToWhitePixelPerc |
a number betwen 0.0 and 1.0 that represents the amount of black pixels on the page, above which the page is not considered blank. A good value to use is 0.03 (corresponds to 3% black pixels). |
Returns
| Type | Description |
|---|---|
| Promise<boolean> |
getAnnotations()
Returns any Annotations placed on this Page.
Declaration
getAnnotations(): IAnnotation[];
Returns
| Type | Description |
|---|---|
| IAnnotation[] |
getBarcodeData()
Returns the recognized Bar Codes in this Page as a an array. The order of the returned bar codes is left-to-right and top-to-bottom
Declaration
getBarcodeData(): IBarcodeData[];
Returns
| Type | Description |
|---|---|
| IBarcodeData[] |
getDpiX()
Returns the horizontal resolution of the Page image.
Declaration
getDpiX(): number;
Returns
| Type | Description |
|---|---|
| number |
getDpiY()
Returns the vertical resolution of the Page image.
Declaration
getDpiY(): number;
Returns
| Type | Description |
|---|---|
| number |
getFileName()
Declaration
getFileName(): string;
Returns
| Type | Description |
|---|---|
| string | the ImageTrust-internal file name of this Page |
getFullImageExists()
Returns whether a full image file is available for this page.
Declaration
getFullImageExists(): boolean;
Returns
| Type | Description |
|---|---|
| boolean |
getFullImagePath()
Returns the full path of the image that corresponds to this page. This image is used internally by ImageTrust and should not be altered or moved in any way.
Declaration
getFullImagePath(): string;
Returns
| Type | Description |
|---|---|
| string |
getHandle()
Returns a ImageTrust-internal unique "handle" for this Page. This value is guaranteed to be globally unique.
This method is a synonym for INode.getUuid().
Declaration
getHandle(): string;
Returns
| Type | Description |
|---|---|
| string |
getImageColorMode()
Returns the Color Mode (or Space) of this Page.
Declaration
getImageColorMode(): ImageColorMode;
Returns
| Type | Description |
|---|---|
| ImageColorMode |
getImageHeight()
Returns the height of the Page image.
Declaration
getImageHeight(): number;
Returns
| Type | Description |
|---|---|
| number |
getImageWidth()
Returns the width of the Page image.
Declaration
getImageWidth(): number;
Returns
| Type | Description |
|---|---|
| number | number |
getOriginalFileName()
Returns the original file name for this page.
Declaration
getOriginalFileName(): string;
Returns
| Type | Description |
|---|---|
| string |
getOriginalFilePath()
Returns the original file name for this page.
Declaration
getOriginalFilePath(): string;
Returns
| Type | Description |
|---|---|
| string |
getPhysicalHeight()
Returns the physical height of the Page image in inches, if there is one, else it returns -1. Non-rastered images (like PDF pages) have a physical height, or raster images that also have information.
Declaration
getPhysicalHeight(): number;
Returns
| Type | Description |
|---|---|
| number |
getPhysicalWidth()
Returns the physical width of the Page image in inches, if there is one, else it returns -1. Non-rastered images (like PDF pages) have a physical width, or raster images that also have information.
Declaration
getPhysicalWidth(): number;
Returns
| Type | Description |
|---|---|
| number |
getSide()
Returns the side of the Page in the original paper Document.
Declaration
getSide(): IPage.Side;
Returns
| Type | Description |
|---|---|
| IPage.Side |
getThumbnailExists()
Returns whether a thumbnail is available for this page.
Declaration
getThumbnailExists(): boolean;
Returns
| Type | Description |
|---|---|
| boolean |
getTitle()
Returns the title of this Page.
Declaration
getTitle(): string;
Returns
| Type | Description |
|---|---|
| string |
isBlank(blackToWhitePixelPerc)
Returns true if this Page is considered to be blank, false otherwise.
Unless there has been a previous call to the method or a blank-page separation has been previously done (that forces this value to be calculated), this method will return undefined. Make sure to check the return value.
Declaration
isBlank(blackToWhitePixelPerc: number): boolean;
Parameters
| Type | Name | Description |
|---|---|---|
| number | blackToWhitePixelPerc |
a number betwen 0.0 and 1.0 that represents the amount of black pixels on the page, above which the page is not considered blank. A good value to use is 0.03 (corresponds to 3% black pixels). |
Returns
| Type | Description |
|---|---|
| boolean |
isEDoc()
Whether this object represent an e-document.
Declaration
isEDoc(): boolean;
Returns
| Type | Description |
|---|---|
| boolean |
isEncrypted()
Returns whether this page is encrypted or not. Currently, encrypted files can only be imported as eDocuments. If this method returns true, then method will also return true. If method returns false, then this method will also return false.
Declaration
isEncrypted(): boolean;
Returns
| Type | Description |
|---|---|
| boolean |
setDpiX(dpiX)
Set the horizontal resolution of the Page image
Declaration
setDpiX(dpiX: number): any;
Parameters
| Type | Name | Description |
|---|---|---|
| number | dpiX |
Returns
| Type | Description |
|---|---|
| any |
setDpiY(dpiY)
Set the horizontal resolution of the Page image
Declaration
setDpiY(dpiY: number): any;
Parameters
| Type | Name | Description |
|---|---|---|
| number | dpiY |
Returns
| Type | Description |
|---|---|
| any |
sourceFileInfo()
Returns the FileInfo that represents the source file this Page came from.
Declaration
sourceFileInfo(): IFileInfo;
Returns
| Type | Description |
|---|---|
| IFileInfo |
splitDocument()
Splits the document that this page belongs to in two documents so as the second document contains this page as its first page.
Declaration
splitDocument(): IDocument;
Returns
| Type | Description |
|---|---|
| IDocument | the new document that was created |