We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexSuggestions & BugsWebsite,  Documentation,  Book Bugs › b0rked reference or b0rked PDF library
Page Index Toggle Pages: 1
b0rked reference or b0rked PDF library ? (Read 865 times)
b0rked reference or b0rked PDF library ?
Nov 29th, 2007, 7:27pm
 
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 ?

Re: b0rked reference or b0rked PDF library ?
Reply #1 - Nov 29th, 2007, 8:26pm
 
Actually nevermind, I'm doing it differently, with createGraphics and beginDraw. Hope it works this time.

But my point is still valid, as in there's something wrong with the above example.
Re: b0rked reference or b0rked PDF library ?
Reply #2 - Jun 7th, 2008, 8:57pm
 
cosmin can you upload the new code?
thanks
Page Index Toggle Pages: 1