How to print a pdf from python?

Hello,

I would like to write a python script that prints a pdf without opening the printing window.

I just need two variable settings: 1. size of the paper; 2. View/Window/Set

Maybe its possible to use something like:
rs.command (_-print “save as pdf, with colors, size: A0, and all needed print settings”)

But how to insert all the settings?

I am a python newbie btw :wink:
Thanks for your help!

Its not clear to me that the Print command can be fully scripted. For example, if you do this:

_-Print _Setup _Destination _Printer "Microsoft Print to PDF" _Enter _Enter _Go

You will see a file save dialog box when you should be prompted for the name of the file to create.

http://mcneel.myjetbrains.com/youtrack/issue/RH-34321

The reset of the setup should be scriptable, though.