public class PCLPageDefinition extends Object
| Constructor and Description |
|---|
PCLPageDefinition(String name,
int selector,
Dimension physicalPageSize,
Rectangle logicalPageRect,
boolean landscape)
Main constructor
|
| Modifier and Type | Method and Description |
|---|---|
static PCLPageDefinition |
getDefaultPageDefinition() |
Rectangle |
getLogicalPageRect() |
String |
getName() |
static PCLPageDefinition |
getPageDefinition(long width,
long height,
int errorMargin)
Tries to determine a matching page definition.
|
static PCLPageDefinition |
getPageDefinition(String name)
Returns a page definition based on a page format.
|
Dimension |
getPhysicalPageSize() |
int |
getSelector() |
boolean |
isLandscapeFormat() |
String |
toString() |
public PCLPageDefinition(String name, int selector, Dimension physicalPageSize, Rectangle logicalPageRect, boolean landscape)
name - the name of the page definitionselector - the selector used by the <ESC> command (page size)physicalPageSize - the physical page sizelogicalPageRect - the rectangle defining the logical pagelandscape - true if it is a landscape formatpublic String getName()
public int getSelector()
public boolean isLandscapeFormat()
public Dimension getPhysicalPageSize()
public Rectangle getLogicalPageRect()
public static PCLPageDefinition getPageDefinition(long width, long height, int errorMargin)
width - the physical page width (in mpt)height - the physical page height (in mpt)errorMargin - the error margin for detecting the right page definitionpublic static PCLPageDefinition getPageDefinition(String name)
name - the name of the page format (ex. "A4" or "Letter")public static PCLPageDefinition getDefaultPageDefinition()
Copyright © 2025 Apache Software Foundation. All rights reserved.