PenProfile 2.x

com.livescribe.afp
Class PageInstance

java.lang.Object
  extended by com.livescribe.afp.PageInstance

public abstract class PageInstance
extends Object

This class encapsulates an instance of the page in a particular paper product. A page instance consists of a unique 64-bit identifier combined with an associated logical page and copy number.

Note: The getCropRegion() method is useful because it defines the size of a paper product after it has been cut. All regions on a physical page are likely to be inside this region.

See Also:
PageAddress, Scale, getCropRegion()

Constructor Summary
PageInstance()
           
 
Method Summary
 int getCopy()
          Gets the copy to which this page belongs.
abstract  Rectangle getCropRegion()
          Returns the crop region for the page.
abstract  Document getDocument()
          Gets the document (paper product) associated with this page instance.
 int getPage()
          Gets the logical page number.
 long getPageAddress()
          Gets the page address of this page.
abstract  int getPageHeight()
          Gets the page height in Anoto Units.
abstract  int getPageWidth()
          Gets the page width in Anoto Units.
abstract  int getPrintedPageNumber()
          Returns the page number printed on the physical page.
abstract  Rectangle getTabletRegion()
          Returns the tablet region for the page.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PageInstance

public PageInstance()
Method Detail

getPage

public final int getPage()
Gets the logical page number. This is a value associated with the unique page address.

Returns:
the logical page number.

getCopy

public final int getCopy()
Gets the copy to which this page belongs.

Returns:
the logical copy number.

getPageAddress

public final long getPageAddress()
Gets the page address of this page. This is a unique 64-bit value in the Anoto address space.

Returns:
the page address, a 64-bit value.
See Also:
PageAddress

getPageWidth

public abstract int getPageWidth()
Gets the page width in Anoto Units.

Note: This returns the full non-cropped page width. Most applications will want to use getCropRegion() instead.

Returns:
the page width, in Anoto Units.
See Also:
Scale, getCropRegion()

getPageHeight

public abstract int getPageHeight()
Gets the page height in Anoto Units.

Note: This returns the full non cropped page height. Most applications will want to use getCropRegion() instead.

Returns:
the page height, in Anoto Units.
See Also:
Scale, getCropRegion()

getCropRegion

public abstract Rectangle getCropRegion()
Returns the crop region for the page. This is the whole area of the page in a paper product after it has been cut after printing. When a page is printed, it is often larger than the product itself.

For example, an A5 spiral-bound notebook has pages that are 148×210 mm. Let's say that they are printed 6 mm larger. The page size (getPageWidth()/getPageHeight()) will be 154×216 mm and the crop region will be 148×210 mm.

Additionally, the top left corner will be offset by an appropriate amount. In the A5 example above, the top-left corner of the crop region would be at 6 mm×6 mm.

Returns:
Rectangle with the crop region.
Since:
2.5
See Also:
Scale

getTabletRegion

public abstract Rectangle getTabletRegion()
Returns the tablet region for the page. This is the area in which the paper tablet will behave as an input device (a mouse, for example). It will be located on or within the crop region.

Often, a notebook may have spiral bindings and/or holes in it. The tablet region will exist inside an area having no holes.

Additionally, this region will have its top-left corner somewhere greater than (0,0) for the same reasons as the crop region.

Returns:
Rectangle with the tablet region or null if it does not exist.
Since:
2.5
See Also:
Scale, getCropRegion()

getPrintedPageNumber

public abstract int getPrintedPageNumber()
Returns the page number printed on the physical page. These usually start at 1.

This will return -1 if the printed page does not have a page number or if it cannot be determined.

Returns:
the printed page number or -1 if it could not be determined.
Since:
2.5

getDocument

public abstract Document getDocument()
Gets the document (paper product) associated with this page instance.

Returns:
a Document representing the associated paper product.
See Also:
Document

PenProfile 2.x

Copyright © 2010 Livescribe Inc. All Rights Reserved.
Confidential and subject to NDA.