org.apache.fop.render.pcl
Class PCLPageDefinition
java.lang.Object
org.apache.fop.render.pcl.PCLPageDefinition
public class PCLPageDefinition
extends java.lang.Object
This class represents a page format with PCL-specific properties.
PCLPageDefinition(String name, int selector, Dimension physicalPageSize, Rectangle logicalPageRect, boolean landscape) - Main constructor
|
PCLPageDefinition
public PCLPageDefinition(String name,
int selector,
Dimension physicalPageSize,
Rectangle logicalPageRect,
boolean landscape)
Main constructor
name
- the name of the page definitionselector
- the selector used by the &l#A command (page size)physicalPageSize
- the physical page sizelogicalPageRect
- the rectangle defining the logical pagelandscape
- true if it is a landscape format
getDefaultPageDefinition
public static PCLPageDefinition getDefaultPageDefinition()
- the default page definition (letter)
getLogicalPageRect
public Rectangle getLogicalPageRect()
- the rectangle defining the logical page
getName
public String getName()
- the name of the page definition
getPageDefinition
public static PCLPageDefinition getPageDefinition(long width,
long height,
int errorMargin)
Tries to determine a matching page definition.
width
- the physical page width (in mpt)height
- the physical page height (in mpt)errorMargin
- the error margin for detecting the right page definition
- the page definition or null if no match was found
getPhysicalPageSize
public Dimension getPhysicalPageSize()
getSelector
public int getSelector()
- the selector used by the &l#A command (page size)
isLandscapeFormat
public boolean isLandscapeFormat()
- true if it is a landscape format
toString
public String toString()
java.lang.Object.toString()
Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.