exporting a numbered pdf file
in
Core Library Questions
•
2 years ago
Hi,
I am really new to processing and quite bad at this, though really stoked to work with it. But along my way, I've been running into the same problem a couple of times… Could someone please help me fix it?
I think the solution should either be really simple or impossible. I am hoping for the first.
So What I am trying to do is export a numbered pdf file, but Processing keeps numbering it as 0000. Is there a way that the pdf library numbers the exported file like 00001, 00002, 00003 ? Here's a breakdown of what's going wrong:
//Dat je een pdf wilt maken
import processing.pdf.*;
// Random waarde van 1 tot 100
float gok1 = random(0,100);
//ALGEMENE SETUP
void setup()
{
size(600, 800);
beginRecord(PDF,"frame_####.pdf");
background(255);
noStroke ();
smooth ();
if (gok1>50){ //als 50 groter is dan 50 (fifty-fifty kans)
gok1=400; // dan is a 400. A is dus altijd minder dan 50 of precies 550.
fill (random(200,255),random(255),random (255));
rect (20, 20, width-40, height -40);
}
endRecord();
exit ();
}
When it's done setting-up, I get this notification in the black box at the bottom:
isRecording(), or this particular variation of it, is not available with this renderer.
And all the files are just named frame_0000.pdf. What am I doing wrong?
Thanks a lot!
Onno
1