org.seltar.Bytes2Web
Class PDFToWeb

java.lang.Object
  extended by PApplet
      extended by org.seltar.Bytes2Web.PostToWeb
          extended by org.seltar.Bytes2Web.PDFToWeb

public class PDFToWeb
extends PostToWeb


Field Summary
 int pageCount
           
 boolean recording
           
 
Constructor Summary
PDFToWeb(PApplet _papplet)
           
 
Method Summary
 void addPage()
          Adds a page to the current recorder if it is recording Increments the current pageCount
 byte[] getBytes()
          Special PDF getBytes, which gets the current bytearray for the pdf-recorder
 boolean isRecording()
          Check to see if the recorder is on
 void post(java.lang.String project, java.lang.String url, java.lang.String filename, boolean popup)
          Special PDF post, which stops the recorder if it's on Also adds .pdf to the filename
 void save(java.lang.String filename)
          Special PDF save, which stops the recorder if it's on Assumes the filename is valid
 void save(java.lang.String prefix, boolean useDate)
          Special PDF save, which stops the recorder if it's on Also adds date if requested, and .pdf to the filename
 void startRecording()
          Starts the pdf-recorder
 void stopRecording()
          Stops the pdf-recorder
 
Methods inherited from class org.seltar.Bytes2Web.PostToWeb
_post, _post, _save, _save, _save
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pageCount

public int pageCount

recording

public boolean recording
Constructor Detail

PDFToWeb

public PDFToWeb(PApplet _papplet)
Method Detail

startRecording

public void startRecording()
Starts the pdf-recorder


addPage

public void addPage()
Adds a page to the current recorder if it is recording Increments the current pageCount


stopRecording

public void stopRecording()
Stops the pdf-recorder


isRecording

public boolean isRecording()
Check to see if the recorder is on

Returns:
if the recorder is on

post

public void post(java.lang.String project,
                 java.lang.String url,
                 java.lang.String filename,
                 boolean popup)
Special PDF post, which stops the recorder if it's on Also adds .pdf to the filename

Parameters:
project - the project folder
url - the url to the file that recieves the data
filename - the filename this is file is supposed to have
popup - wether or not to open a link to the image

save

public void save(java.lang.String filename)
Special PDF save, which stops the recorder if it's on Assumes the filename is valid

Parameters:
filename - the filename

save

public void save(java.lang.String prefix,
                 boolean useDate)
Special PDF save, which stops the recorder if it's on Also adds date if requested, and .pdf to the filename

Parameters:
prefix - the filename
useDate - prefix with date

getBytes

public byte[] getBytes()
Special PDF getBytes, which gets the current bytearray for the pdf-recorder

Overrides:
getBytes in class PostToWeb