PageInfo
Inheritance: java.lang.Object
public class PageInfo
The PageInfo class represents information about a specific page in a document.
It provides details such as the page number, width, height, and other relevant properties. Use this class to retrieve information about individual pages in a document during the comparison process.
Example usage:
try (Comparer comparer = new Comparer(sourceFile)) {
comparer.add(targetFile);
comparer.compare(resultFile);
final ChangeInfo[] changes = comparer.getChanges();
for (ChangeInfo change : changes) {
final PageInfo pageInfo = change.getPageInfo();
// Print the page information
System.out.println("Page Number: " + pageInfo.getPageNumber());
System.out.println("Page Width: " + pageInfo.getWidth());
System.out.println("Page Height: " + pageInfo.getHeight());
}
}
Constructors
Constructor | Description |
---|---|
PageInfo(int pageNumber, int width, int height) | Initializes a new instance of the PageInfo class with configuring pageNumber, width and height. |
Methods
Method | Description |
---|---|
getWidth() | Gets the width of the page |
setWidth(int value) | Sets the width of the page |
getHeight() | Gets the height of the page |
setHeight(int value) | Sets the height of the page |
getPageNumber() | Gets the number of the page |
setPageNumber(int value) | Sets the number of the page |
toString() |
PageInfo(int pageNumber, int width, int height)
public PageInfo(int pageNumber, int width, int height)
Initializes a new instance of the PageInfo class with configuring pageNumber, width and height.
Parameters:
Parameter | Type | Description |
---|---|---|
pageNumber | int | The number of the page |
width | int | The width of the page |
height | int | The height of the page |
getWidth()
public final int getWidth()
Gets the width of the page
Returns: int - the width of the page
setWidth(int value)
public final void setWidth(int value)
Sets the width of the page
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | The width of the page |
getHeight()
public final int getHeight()
Gets the height of the page
Returns: int - the height of the page
setHeight(int value)
public final void setHeight(int value)
Sets the height of the page
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | The height of the page |
getPageNumber()
public final int getPageNumber()
Gets the number of the page
Returns: int - the number of the page
setPageNumber(int value)
public final void setPageNumber(int value)
Sets the number of the page
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | The number of the page |
toString()
public String toString()
Returns: java.lang.String