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

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

public class PdfDump
extends java.lang.Object
implements IOutputCommand

Dumps various values to the console (for debugging purposes)

Author:
alb

Field Summary
private  java.lang.String root
           
 
Constructor Summary
PdfDump()
           
 
Method Summary
(package private)  void doHeading(GDD gdd, Token tok)
          Print the heading before the dump that states the location in the file of the [dump: command.
(package private)  void dumpAll(GDD gdd, PdfData pdf, Token tok, boolean doHeading)
          Dump all available info.
(package private)  void dumpCommandLine(GDD gdd, Token tok, boolean doHeading)
          Dump the command line and related data.
(package private)  void dumpPage(GDD gdd, PdfData pdf, Token tok, boolean doHeading)
          Dump the page dimensions and related data.
(package private)  void dumpParagraph(GDD gdd, PdfData pdf, Token tok, boolean doHeading)
          Dump the paragraph dimensions and related data.
(package private)  void dumpUserStrings(GDD gdd, Token tok, boolean doHeading)
          Dump the user strings, one k,v pair per line.
 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

PdfDump

public PdfDump()
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

dumpAll

void dumpAll(GDD gdd,
             PdfData pdf,
             Token tok,
             boolean doHeading)
Dump all available info. (which is a lot, so use sparingly!)

Parameters:
gdd - the GDD containing the needed literals
pdf - the PDF data at this point in the execution
tok - the token of the dump command
doHeading - should the heading be printed? (that is, is this the first element to be dumped, if part of a series. True = print heading; false = don't print it.

dumpCommandLine

void dumpCommandLine(GDD gdd,
                     Token tok,
                     boolean doHeading)
Dump the command line and related data.

Parameters:
gdd - the GDD containing the needed literals
tok - the token of the dump command
doHeading - should the heading be printed? (that is, is this the first element to be dumped, if part of a series. True = print heading; false = don't print it.

dumpPage

void dumpPage(GDD gdd,
              PdfData pdf,
              Token tok,
              boolean doHeading)
Dump the page dimensions and related data.

Parameters:
gdd - the GDD containing the needed literals
pdf - the PDF data at this point in the execution
tok - the token of the dump command
doHeading - should the heading be printed? (that is, is this the first element to be dumped, if part of a series. True = print heading; false = don't print it.

dumpParagraph

void dumpParagraph(GDD gdd,
                   PdfData pdf,
                   Token tok,
                   boolean doHeading)
Dump the paragraph dimensions and related data.

Parameters:
gdd - the GDD containing the needed literals
pdf - the PDF data at this point in the execution
tok - the token of the dump command
doHeading - should the heading be printed? (that is, is this the first element to be dumped, if part of a series. True = print heading; false = don't print it.

dumpUserStrings

void dumpUserStrings(GDD gdd,
                     Token tok,
                     boolean doHeading)
Dump the user strings, one k,v pair per line. If no strings defined, it states this.

Parameters:
gdd - the GDD containing the needed literals
tok - the token of the dump command
doHeading - should the heading be printed? (that is, is this the first element to be dumped, if part of a series. True = print heading; false = don't print it.

doHeading

void doHeading(GDD gdd,
               Token tok)
Print the heading before the dump that states the location in the file of the [dump: command.

Parameters:
gdd - GDD, for access to literals
tok - token, for access to time and place in file where command encountered.

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