Automatically baking shaded grasshopper to pdf


I am trying to figure out how to automatically save a pdf from a grasshopper generated assembly with the press of a button. I found a script doing something quite similar from the following thread:

This works quite well (I still need to do some maths making sure that the assembly always scales right and is centred) but when I run it, it bakes/prints the wireframe to pdf. I don’t want the wireframe but a shaded, rendered or arctic view. I’ve searched through the code, but this script far exceeds my skills in programming so I couldn’t find what to add/adjust to solve this.

I’ve attached the grasshopper script, as well as what I want vs what it returns.

I hope some of you are able to help me solve this.

Thanks in advance! (100.1 KB)
What_I_Get.pdf (2.0 KB)
What_I_Want.pdf (865.6 KB)

It seems that this is too much to ask, so let me explain what I really need:

I am working on a script that automatically reads an Excel sheet that my company has, to make a model of a assembly (similar to the gh file I attached in the main post) and display it with measurements and material count.

My boss wants me to add a system in this to print this display on A4 so it can be sent to the workplace for production/assembly. It needs to be idiot-proof because the person who prepares those drawings isn’t skilled with Rhino/Grasshopper. To make it look professional, the assembly needs to be displayed on the same spot on every order, where the assembly is scaled accordingly.

In short: I need a system that takes the size of my gh-model, makes a print template of it, and automatically saves as pdf to be printed.

I have most of this in place thanks to Dharman, but it’s not yet user friendly enough (needing to press 3 buttons to print and 1 to reset everything) and it prints a wireframe which is very unclear for the type of products we make.

I hope that some of you might know a solution for one of these problems. If you know a quick way to print to pdf without having to set the print location everytime, that might also be helpful.


For what is worth I use RhinoCommon to export to pdf (line drawing), I generate all the drawing in a single PDF.
To draw bitmap
So you’ll have to find a way to place your object, set them to the good scale,
capture this image

here my script, I use also a lot Elefront. (125.3 KB)

Some more explanation here

Working also on an other project I ended using Tex in order to have a nice document with image not embedded inside, then I “bake” this Tex to PDF.

1 Like

I think you sent me in the right direction, I’m starting to get nice results (Still a bunch of errors, C# isn’t my strong suit, but I think it’s going somewhere). Thank you!

By the way, the table you made looks awesome!

1 Like

Hi Laurent,

I am interested in a methodology to create pdfs from GH. I tried to download your script, but a lot of components were missing. I had installedl Elefront 5.1.2 (I am using rhino 7) and I believe this version is incomptible with previous ones… Any chance for an updated version or a screenshot of the components so I can try to recreate? I am still figuring out the code, so the correct set up will help.


Here is a version without Elefront. As it uses references of object I put also a 3dm file.
testToPdf.3dm (1.2 MB) (24.4 KB)


Thank you!