Hi, I searched in the forum for someone with the same problem, but with no sucess.
I need to save a frame in PDF from a animation, so I used the processing.PDF library. I writed my code based on the example of the reference of the library (
http://processing.org/reference/libraries/pdf/). A part of the code:
import processing.pdf.*;
void setup(){
size(1600,900);
background(255);
noFill();
smooth();
record = false;
px = width/2;
py = height/2;
logo = loadImage("logo.png");
image(logo,width/2 - 250,height/2 - 50);
}
void draw(){
if (record) {
beginRaw(PDF, "output.pdf");
}
if (record) {
endRaw();
record = false;
}
void keyPressed(){
if (key == 'r' || key == 'R') {
record = true;
}
}
When I press the key 'r' to save the PDF the program still run, but no file is saved. This message shows in the display:
beginRaw() is not available with this renderer
endRaw() is not available with this renderer
I've already used this sames functions to save PDFs files of animations, but using the P3D renderer. I tried to use in this code and the previous error was not displayed, but the file saved has no graphics saved, it's just a white PDF of 0kb. Besides, using P3D modifies the graphics that I'm trying to save, that are just a bunch of lines with a large stroke width.
I really need to save these PDFs for an illustration. Can someone help me? Thanks.