As I said in another thread, the PDF library dies on me on two different computers. I found a third one that doesn't kill it.
http://processing.org/discourse/yabb_beta/YaBB.cgi?board=LibraryProblems;action=display;num=1169146997
Now, the example in the reference doesn't work ( http://processing.org/reference/libraries/pdf/index.html );
It's this one, aka "Pausing While Recording (With Screen Display)" modified a little because it has a few errors.
Code:
import processing.pdf.*;
boolean recording;
int time;
PGraphics pdf;
void setup() {
size(600, 900);
noStroke();
pdf = createGraphics(500,700,PDF, "pause-resume.pdf");
}
void draw() {
time = millis()/50;
rect(0,time*2,time,2);
}
void keyPressed() {
if (key == 'r') {
if (recording) {
endRecord();
println("Recording stopped.");
recording = false;
} else {
beginRecord(pdf);
println("Recording started.");
recording = true;
}
} else if (key == 'q') {
println("quitting");
if (recording) endRecord();
exit();
}
}
I'm just trying to export some stuff to PDF but not all of it. This example just saves the last beginRecord.
What's wrong ?