software.authoring
Class FillInPdfForm
java.lang.Object
software.authoring.FillInPdfForm
public class FillInPdfForm
- extends java.lang.Object
|
Method Summary |
static void |
fillIn(org.gwu.voting.standardFormat.electionSpecification.ElectionSpecification es,
java.lang.String form,
java.lang.String pathToPrintsFile,
java.util.Vector<java.awt.Point> range,
char[] chars,
boolean charReset,
java.lang.String outDir)
|
static void |
main(java.lang.String[] args)
debug method |
static void |
randomVote(FormMaker fm,
java.lang.String form)
TODO this can be made more efficient
Given a pdf ballot, it randomly votes it and writes it in a file with the same name, but with sufix Voted |
static void |
topAndBottomSeparatly(FormMaker fm,
java.lang.String form)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FillInPdfForm
public FillInPdfForm()
fillIn
public static void fillIn(org.gwu.voting.standardFormat.electionSpecification.ElectionSpecification es,
java.lang.String form,
java.lang.String pathToPrintsFile,
java.util.Vector<java.awt.Point> range,
char[] chars,
boolean charReset,
java.lang.String outDir)
throws java.lang.Exception
- Parameters:
es - - the ELection Specificationform - - a blank pdf form (coresponding to the ElectionSpec)pathToPrintsFile - - where the prints file from m2 arerange - - A pdf file is produced for each number in each range. One range is from x(inclusive) to y(inclusive)chars - - the chars to be used for filling in the formcharReset - - true if for each contest, the chars are taken from the begining of the chars arrayoutDir - - the directory where the pdf ballots are written. The names are serial.pdf (where serial is a number)
- Throws:
java.lang.Exception - - no Exception is caugth and no Exception is Explicitly thrown
randomVote
public static void randomVote(FormMaker fm,
java.lang.String form)
throws java.lang.Exception
- TODO this can be made more efficient
Given a pdf ballot, it randomly votes it and writes it in a file with the same name, but with sufix Voted
- Parameters:
fm - - used for getting all the Questions and the javascript.form - - a pdf ballot, or a directory. if it is a directory, it takes all the files from it recursevly and votes them all
- Throws:
java.lang.Exception - - no Exception is caugth and no Exception is Explicitly thrown
topAndBottomSeparatly
public static void topAndBottomSeparatly(FormMaker fm,
java.lang.String form)
throws java.lang.Exception
- Throws:
java.lang.Exception
main
public static void main(java.lang.String[] args)
throws java.lang.Exception
- debug method
- Parameters:
args - ElectionSpec PdfForm PrintsFile From0-To0;From1-To1 OutDir Chars
- Throws:
org.gwu.voting.standardFormat.electionSpecification.exceptions.ESException
java.io.IOException
com.lowagie.text.DocumentException
java.lang.Exception