we're trying to save some pdfs of the code below, but we're having some problems with the images on the background.
we can save normally the vector lines, but the background images don't get loaded and don't get saved on the pdf.
can anyone help saying what's the problem, or suggest another way to load/save the images?
ps.: we cannot save a tiff, we need the lines to be vector (no problem about the background images being bitmaps)
another help: can anyone suggest how to save the pdfs with sequential names? (like foto1.pdf, foto2.pdf...) because we'll need to generate a lot of pdfs, and we can't overwrite them
the error we get is:
Exception in thread "Animation Thread" java.lang.RuntimeException: No set() for PGraphicsPDF
at processing.pdf.PGraphicsPDF.nope(PGraphicsPDF.java:665)
at processing.pdf.PGraphicsPDF.set(PGraphicsPDF.java:511)
at processing.core.PGraphics.backgroundImpl(PGraphics.java:5137)
at processing.core.PGraphics.background(PGraphics.java:5127)
at processing.core.PApplet.background(PApplet.java:9956)
at sobre_o_tempo6.keyPressed(sobre_o_tempo6.java:93)
at processing.core.PApplet.handleKeyEvent(PApplet.java:1996)
at processing.core.PApplet.dequeueKeyEvents(PApplet.java:1979)
at processing.core.PApplet.handleDraw(PApplet.java:1643)
at processing.core.PApplet.run(PApplet.java:1530)
at java.lang.Thread.run(Thread.java:680)
import processing.pdf.*;
PImage LL1;
PImage LL2;
PImage LL3;
PImage LL4;
PImage LL5;
PImage LL6;
PImage LL7;
PImage LL8;
PImage LL9;
PImage LL10;
PImage LL11;
PImage LL12;
PImage LL13;
PImage LL14;
PImage LL15;
void setup() {
size(1000, 666);
colorMode(HSB, 360, 100, 100); //Define o modo de cor para Hue, Saturation, Brigthness facilia a variação de tons
//background(0);
noFill();
frameRate(20);
smooth();
background(0);
beginRecord(PDF, "foto.pdf");
}
void draw() {
LL1 = loadImage("LL1.jpg");
LL2 = loadImage("LL2.jpg");
LL3 = loadImage("LL3.jpg");
LL4 = loadImage("LL4.jpg");
LL5 = loadImage("LL5.jpg");
LL6 = loadImage("LL6.jpg");
LL7 = loadImage("LL7.jpg");
LL8 = loadImage("LL8.jpg");
LL9 = loadImage("LL9.jpg");
LL10 = loadImage("LL10.jpg");
LL11 = loadImage("LL11.jpg");
LL12 = loadImage("LL12.jpg");
LL13 = loadImage("LL13.jpg");
LL14 = loadImage("LL14.jpg");
LL15 = loadImage("LL15.jpg");
noFill();
if (mousePressed && (mouseButton == LEFT)) { //Se mouse pressionado e botão esquerdo, faz