org.apache.fop.render.pcl

Class PCLPageDefinition


public class PCLPageDefinition
extends java.lang.Object

This class represents a page format with PCL-specific properties.

Constructor Summary

PCLPageDefinition(String name, int selector, Dimension physicalPageSize, Rectangle logicalPageRect, boolean landscape)
Main constructor

Method Summary

static PCLPageDefinition
getDefaultPageDefinition()
Rectangle
getLogicalPageRect()
String
getName()
static PCLPageDefinition
getPageDefinition(long width, long height, int errorMargin)
Tries to determine a matching page definition.
Dimension
getPhysicalPageSize()
int
getSelector()
boolean
isLandscapeFormat()
String
toString()

Constructor Details

PCLPageDefinition

public PCLPageDefinition(String name,
                         int selector,
                         Dimension physicalPageSize,
                         Rectangle logicalPageRect,
                         boolean landscape)
Main constructor
Parameters:
name - the name of the page definition
selector - the selector used by the &l#A command (page size)
physicalPageSize - the physical page size
logicalPageRect - the rectangle defining the logical page
landscape - true if it is a landscape format

Method Details

getDefaultPageDefinition

public static PCLPageDefinition getDefaultPageDefinition()
Returns:
the default page definition (letter)

getLogicalPageRect

public Rectangle getLogicalPageRect()
Returns:
the rectangle defining the logical page

getName

public String getName()
Returns:
the name of the page definition

getPageDefinition

public static PCLPageDefinition getPageDefinition(long width,
                                                  long height,
                                                  int errorMargin)
Tries to determine a matching page definition.
Parameters:
width - the physical page width (in mpt)
height - the physical page height (in mpt)
errorMargin - the error margin for detecting the right page definition
Returns:
the page definition or null if no match was found

getPhysicalPageSize

public Dimension getPhysicalPageSize()
Returns:
the physical page size

getSelector

public int getSelector()
Returns:
the selector used by the &l#A command (page size)

isLandscapeFormat

public boolean isLandscapeFormat()
Returns:
true if it is a landscape format

toString

public String toString()
See Also:
java.lang.Object.toString()

Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.