org.pz.platypus.plugin.pdf.commands
Class PdfPageSize

java.lang.Object
  extended by org.pz.platypus.plugin.pdf.commands.PdfPageSize
All Implemented Interfaces:
IOutputCommand

public class PdfPageSize
extends java.lang.Object
implements IOutputCommand

Handle changes in page size when specified as a string ( LETTER, LEGAL, A4, etc.)

Author:
alb

Field Summary
private  java.lang.String root
           
 
Constructor Summary
PdfPageSize()
           
 
Method Summary
(package private)  java.util.HashMap<java.lang.String,com.lowagie.text.Rectangle> createPageSizeLookupTable()
          Load the page names and the corresponding iText rectangles into a hash table.
 void flushExistingText(PdfData pdf)
          Current text must be flushed to PDF file using the current page size before the new page size takes effect.
 java.lang.String getRoot()
          get the root of the command.
 int process(IOutputContext context, Token tok, int tokNum)
          method for processing this command in the output plugin.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

root

private java.lang.String root
Constructor Detail

PdfPageSize

public PdfPageSize()
Method Detail

process

public int process(IOutputContext context,
                   Token tok,
                   int tokNum)
Description copied from interface: IOutputCommand
method for processing this command in the output plugin.

Specified by:
process in interface IOutputCommand
Parameters:
context - the context/state of the output document
tok - the command token as found in the token stream
tokNum - the number of the token in the token list

flushExistingText

public void flushExistingText(PdfData pdf)
Current text must be flushed to PDF file using the current page size before the new page size takes effect.

Parameters:
pdf -

createPageSizeLookupTable

java.util.HashMap<java.lang.String,com.lowagie.text.Rectangle> createPageSizeLookupTable()
Load the page names and the corresponding iText rectangles into a hash table. for more info on page sizes see: http://en.wikipedia.org/wiki/Paper_size#Loose_sizes for info on ID cards sizes, see: http://en.wikipedia.org/wiki/ISO_7810

Returns:
the loaded up HashMap containing all supported page-size names

getRoot

public java.lang.String getRoot()
Description copied from interface: IOutputCommand
get the root of the command. For example, fsize: in [fsize:12pt]

Specified by:
getRoot in interface IOutputCommand
Returns:
the root as a string


Copyright © 2008-10 Pacific Data Works LLC