java.lang.Object
com.aspose.words.PageInfo
public class PageInfo
To learn more, visit the Rendering documentation article. The page width and height returned by this object represent the "final" size of the page e.g. they are
already rotated to the correct orientation.
| Property Getters/Setters Summary | ||
|---|---|---|
boolean | getColored() | |
Returns true if the page contains colored content.
|
||
float | getHeightInPoints() | |
| Gets the height of the page in points. | ||
boolean | getLandscape() | |
Returns true if the page orientation specified in the document for this page is landscape.
|
||
int | getPaperSize() | |
| Gets the paper size as enumeration. The value of the property is PaperSize integer constant. | ||
int | getPaperTray() | |
| Gets the paper tray (bin) for this page as specified in the document. The value is implementation (printer) specific. | ||
java.awt.Dimension | getSizeInPoints() | |
| Gets the page size in points. | ||
float | getWidthInPoints() | |
| Gets the width of the page in points. | ||
| Method Summary | ||
|---|---|---|
java.awt.Dimension | getSizeInPixels(float scale, float dpi) | |
| Calculates the page size in pixels for a specified zoom factor and resolution. | ||
java.awt.Dimension | getSizeInPixels(float scale, float horizontalDpi, float verticalDpi) | |
| Calculates the page size in pixels for a specified zoom factor and resolution. | ||
| Property Getters/Setters Detail |
|---|
getColored | |
public boolean getColored() | |
true if the page contains colored content.
Example:
Shows how to check whether the page is in color or not.Document doc = new Document(getMyDir() + "Document.docx"); // Check that the first page of the document is not colored. Assert.assertFalse(doc.getPageInfo(0).getColored());
getHeightInPoints | |
public float getHeightInPoints() | |
getLandscape | |
public boolean getLandscape() | |
true if the page orientation specified in the document for this page is landscape.
getPaperSize | |
public int getPaperSize() | |
getPaperTray | |
public int getPaperTray() | |
getSizeInPoints | |
public java.awt.Dimension getSizeInPoints() | |
getWidthInPoints | |
public float getWidthInPoints() | |
| Method Detail |
|---|
getSizeInPixels | |
public java.awt.Dimension getSizeInPixels(float scale, float dpi) | |
scale - The zoom factor (1.0 is 100%).dpi - The resolution (horizontal and vertical) to convert from points to pixels (dots per inch).getSizeInPixels | |
public java.awt.Dimension getSizeInPixels(float scale, float horizontalDpi, float verticalDpi) | |
scale - The zoom factor (1.0 is 100%).horizontalDpi - The horizontal resolution to convert from points to pixels (dots per inch).verticalDpi - The vertical resolution to convert from points to pixels (dots per inch).