From what I have understood, aaronboumans wants to put to PDF this specific picture (from the link he submitted)
and the sketch code which is supplied on that page.
This may have seem trivial task to redirect output to PDF renderer, however the sketch renders to P3D (you can see on the picture there's a rendering of cubes with some sides missing). And it uses XYZ-coordinates to render edges of the cube. To convert to PDF probably it's necessary to implement conversion of XYZ cube coordinates to 2d coordinate. (which I don't know how to do :S)