public class PageInfo extends Object
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());
}
}
Comparer,
ChangeInfo| Constructor and Description |
|---|
PageInfo(int pageNumber,
int width,
int height)
Initializes a new instance of the PageInfo class with configuring pageNumber, width and height.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getHeight()
Gets the height of the page
|
int |
getPageNumber()
Gets the number of the page
|
int |
getWidth()
Gets the width of the page
|
void |
setHeight(int value)
Sets the height of the page
|
void |
setPageNumber(int value)
Sets the number of the page
|
void |
setWidth(int value)
Sets the width of the page
|
String |
toString() |
public PageInfo(int pageNumber,
int width,
int height)
Initializes a new instance of the PageInfo class with configuring pageNumber, width and height.
pageNumber - The number of the pagewidth - The width of the pageheight - The height of the pagepublic final int getHeight()
Gets the height of the page
public final int getPageNumber()
Gets the number of the page
public final int getWidth()
Gets the width of the page
public final void setHeight(int value)
Sets the height of the page
value - The height of the pagepublic final void setPageNumber(int value)
Sets the number of the page
value - The number of the pagepublic final void setWidth(int value)
Sets the width of the page
value - The width of the pageCopyright © 2024. All rights reserved.