Page
Leave feedback
On this page
All Implemented Interfaces: java.io.Serializable
public interface Page extends Serializable
Represents a single page that can be viewed.
The Page interface defines the contract for accessing and manipulating a single page that can be viewed in the GroupDocs.Viewer component. It provides methods to retrieve information such as the page number, size, and other properties.
Example usage:
try (Viewer viewer = new Viewer("document.pst")) {
final OutlookViewInfo viewInfo = (OutlookViewInfo) viewer.getViewInfo(ViewInfoOptions.forHtmlView());
List pages = viewInfo.getPages();
for (Page page : pages) {
// Use the page object for further operations
}
}
Note: The default implementation of this interface is PageImpl.
| Method | Description |
|---|---|
| getName() | Retrieves the name of the worksheet or page. |
| setName(String name) | Sets the name of the worksheet or page. |
| getNumber() | Retrieves the page number. |
| setNumber(int number) | Sets the page number. |
| isVisible() | Retrieves the page visibility indicator. |
| setVisible(boolean visible) | Sets the page visibility indicator. |
| getWidth() | Retrieves the width of the page in pixels when viewing as JPG or PNG. |
| setWidth(int width) | Sets the width of the page in pixels when viewing as JPG or PNG. |
| getHeight() | Retrieves the height of the page in pixels when viewing as JPG or PNG. |
| setHeight(int height) | Sets the height of the page in pixels when viewing as JPG or PNG. |
| getLines() | Retrieves the lines contained in the page when viewing as JPG or PNG with enabled Text Extraction. |
| setLines(List |
Sets the lines contained in the page when viewing as JPG or PNG with enabled Text Extraction. |
public abstract String getName()
Retrieves the name of the worksheet or page.
Returns: java.lang.String - the name of the worksheet or page.
public abstract void setName(String name)
Sets the name of the worksheet or page.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| name | java.lang.String | the name to set for the worksheet or page. |
public abstract int getNumber()
Retrieves the page number.
Returns: int - the page number.
public abstract void setNumber(int number)
Sets the page number.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| number | int | the page number to set. |
public abstract boolean isVisible()
Retrieves the page visibility indicator.
Returns: boolean - the page visibility indicator.
public abstract void setVisible(boolean visible)
Sets the page visibility indicator.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| visible | boolean | true if the page is visible, false otherwise. |
public abstract int getWidth()
Retrieves the width of the page in pixels when viewing as JPG or PNG.
Returns: int - the width of the page.
public abstract void setWidth(int width)
Sets the width of the page in pixels when viewing as JPG or PNG.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| width | int | the width to set for the page. |
public abstract int getHeight()
Retrieves the height of the page in pixels when viewing as JPG or PNG.
Returns: int - the height of the page.
public abstract void setHeight(int height)
Sets the height of the page in pixels when viewing as JPG or PNG.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| height | int | the height to set for the page. |
public abstract List<Line> getLines()
Retrieves the lines contained in the page when viewing as JPG or PNG with enabled Text Extraction.
Returns: java.util.List<com.groupdocs.viewer.results.Line> - the lines contained in the page.
public abstract void setLines(List<Line> lines)
Sets the lines contained in the page when viewing as JPG or PNG with enabled Text Extraction.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| lines | java.util.List<com.groupdocs.viewer.results.Line> | the list of lines to set for the page. |
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.