We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm adding a feature to my Processing library, coded in Java in Eclipse. In my code, I want to be able to start a new page in my PDF output. Processing's documentation says I do the following, where
theSketch is my pointer of type
PApplet back to my sketch:
PGraphicsPDF pdf = (PGraphicsPDF) theSketch.g; pdf.nextPage();
But this doesn't compile because the Java compiler reports that
PGraphicsPDF is an unknown symbol. Among my many attempted solutions, I copied
pdf.jar from the Processing installation (specifically, on my Mac, from /Applications/Processing.app/Contents/Java/modes/java/libraries/pdf/library) into Eclipse's folder Referenced Libraries, added it to the Java Build Path for my project, and imported
processing.pdf.* at the top of the file (in addition to
processing.core.*), but the compile fails with the error "package processing.pdf does not exist" . Can someone please help me get this code (or something like it) to work?