My starting point is a template I found on a blog (https://gist.github.com/1330065#file_p5_main.java):
<#assign licenseFirst = "/*">
<#assign licensePrefix = " * ">
<#assign licenseLast = " */">
<#include "../Licenses/license-${project.license}.txt">
<#if package?? && package != "">
package ${package};
</#if>
/**
*
* @author ${user}
*/
import processing.core.PApplet;
@SuppressWarnings("serial")
public class ${name} extends PApplet{
@Override
public void setup(){
size(300, 300, P3D);
}
@Override
public void draw(){
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
PApplet.main(new String[]{ ${package}.${name}.class.getName()});
}
}
This outputs to an applet. I tried to modify it with instructions I found here (http://www.processing.org/discourse/beta/num_1246034274.html) to create a pdf but could not get it to work.
Note: I have the pdf and itext libraries on the classpath.
Thanks!
Answer to my own question, for an export without a screen view, and single frame: