The background should be applied between record calls to apply to final PDF (also to SVG):
void draw()
{
//background(bg);
beginRecord(PDF,"test.pdf");
background(bg); //Background should be here to apply to PDF
for(Cell c : voronCells)
{
c.render();
}
endRecord();
}
Check this out:
There may be something in there that will allow you to generate your shapes and create a PDF or SVG with vector graphics instead of raster graphics.
I was able to export PDFs (with vector graphics) for one of the examples: