Incremental pdf file export

Hello,

Which could be a way to export a new pdf file with an incremental number every time I open the sketch or run the code? Thank you

`int maxImage = 2; PImage[] imgs = new PImage[maxImage]; float x = 0; float y = 0; int imageIndex = 0;

size(595,842);

beginRecord(PDF, "test00.pdf"); background(0);

for(int counter = 0; counter < 5; counter++){
for(int i = 0; i < imgs.length; i++){
imgs[i] = loadImage(i + ".png");
image(imgs[imageIndex], x + 150, y + 150);
imageIndex = (imageIndex +1) % imgs.length;
x += random(0, 50);
}
}

endRecord(); println("End");`

Tagged:

Answers

Sign In or Register to comment.