Rhino 8 Print & -Print Different printing methods?

Hello,

I was the most happy person when Rhino introduced a button to keep page size as per layout and it was all perfect up to the moment I want to develop an automation to my routines.

The idea is to run Rhino from command line (cmd) and pass all the needed parameters through ui-less commands eg. -Print

The issue is that the -Print and Print are appears to be using different algorithms and with gui-less -Print there is no option to dynamically change the page orientation based on your layouts

Please help to find an easy workaround without having a 3rd party python script that merges different page orientations in on document (I found that as a solution in Rhino 6)

System info:

Rhino 8 SR21 2025-7-7 (Rhino 8, 8.21.25188.17001, Git hash:master @ 2e05bb7e11ec03aa58cc543d92330d59df05d32b)
License type: Commercial, build 2025-07-07
License details: Cloud Zoo

Windows 10 (10.0.17763 SR0.0) or greater (Physical RAM: 8GB)
.NET 8.0.14

Computer platform: LAPTOP - Plugged in [85% battery remaining]

Hybrid graphics configuration.
Primary display: Intel(R) Iris(R) Xe Graphics (Intel) Memory: 1GB, Driver date: 10-7-2021 (M-D-Y).

Integrated graphics device with 4 adapter port(s)

  • Windows Main Display is laptop’s integrated screen or built-in port
    Primary OpenGL: NVIDIA GeForce MX450 (NVidia) Memory: 2GB, Driver date: 8-14-2024 (M-D-Y). OpenGL Ver: 4.6.0 NVIDIA 560.94

Integrated accelerated graphics device (shares primary device ports)

  • Video pass-through to primary display device

OpenGL Settings
Safe mode: Off
Use accelerated hardware modes: On
GPU Tessellation is: On
Redraw scene when viewports are exposed: On
Graphics level being used: OpenGL 4.6 (primary GPU’s maximum)

Anti-alias mode: 4x
Mip Map Filtering: Linear
Anisotropic Filtering Mode: High

Vendor Name: NVIDIA Corporation
Render version: 4.6
Shading Language: 4.60 NVIDIA
Driver Date: 8-14-2024
Driver Version: 32.0.15.6094
Maximum Texture size: 32768 x 32768
Z-Buffer depth: 24 bits
Maximum Viewport size: 32768 x 32768
Total Video Memory: 2 GB

Rhino plugins that do not ship with Rhino

Rhino plugins that ship with Rhino
C:\Program Files\Rhino 8\Plug-ins\Commands.rhp “Commands” 8.21.25188.17001
C:\Program Files\Rhino 8\Plug-ins\rdk.rhp “Renderer Development Kit”
C:\Program Files\Rhino 8\Plug-ins\RhinoRenderCycles.rhp “Rhino Render” 8.21.25188.17001
C:\Program Files\Rhino 8\Plug-ins\rdk_etoui.rhp “RDK_EtoUI” 8.21.25188.17001
C:\Program Files\Rhino 8\Plug-ins\NamedSnapshots.rhp “Snapshots”
C:\Program Files\Rhino 8\Plug-ins\MeshCommands.rhp “MeshCommands” 8.21.25188.17001
C:\Program Files\Rhino 8\Plug-ins\RhinoCycles.rhp “RhinoCycles” 8.21.25188.17001
C:\Program Files\Rhino 8\Plug-ins\Grasshopper\GrasshopperPlugin.rhp “Grasshopper” 8.21.25188.17001
C:\Program Files\Rhino 8\Plug-ins\Toolbars\Toolbars.rhp “Toolbars” 8.21.25188.17001
C:\Program Files\Rhino 8\Plug-ins\3dxrhino.rhp “3Dconnexion 3D Mouse”
C:\Program Files\Rhino 8\Plug-ins\Displacement.rhp “Displacement”
C:\Program Files\Rhino 8\Plug-ins\SectionTools.rhp “SectionTools”

Hi @aocheretianko

Post your macro that is failing perhaps you need to go further into the options in your script/macro.
RM

Hi @3dsynergy Thanks for your input.

Unfortunately I don’t see it as any possible settings. Please check the screenshots of Print preview done by using two different methods in the original post. In case of -Print it calls an old print dialog from Rhino 6….

Here is a Rhino script. Please note that in this example I am using “microsoft print to pdf” printer just because when I chose “Rhino PDF” it does not want to accept file name as an argument and opens file saving dialog (to specify where to store the file). I am aware that printing settings may vary upon different printers so that I did testing manual for “Print to PDF” (Rhino pdf printer)

/runscript=“-Print s v a _Enter d p ““microsoft print to pdf”” _Enter _Enter g “”.\TP.pdf”" -Exit n"

Hi @aocheretianko

Ok I thought that was the case, I was thinking there might have been a switch you missed in your macro but looks like you experimented with both ways.
Perhaps this didn’t get updated yet?
Hopefully McNeel will chime in, makes sense that you should be able to macro the newer options.
RM

Yeah … Can you perhaps think of any workaround? The goal is to not have my user interacting with rhino at all.

Are there any other suggestions or workarounds?

Hi Aocheretianko -

I’ve put this issue on the list as RH-88989 Print: Expose Layout Page Size for Macros
-wim

Hi @aocheretianko

If you’re willing to dive into python I believe there is a way to script printing using that.

Maybe this macro from this thread will work for you?
Batch Printing And Exporting to PDF using Python - Scripting - McNeel Forum

A more general thread on it.
Printing to a PDF with Python/Rhino - Rhino Developer - McNeel Forum

RM

Hi @3dsynergy

Thanks, it will be a good workaround!

Following proposed methods by @3dsynergy I did full python workaround until a proper -Print will work.

import Rhino
import scriptcontext as sc
import rhinoscriptsyntax as rs
import os


working_dir = os.path.split(os.path.dirname(path))[0]
destination_file = os.path.join(working_dir, report_number + '.pdf')

pdf_writer = Rhino.FileIO.FilePdf.Create()

page_view = sc.doc.Views.GetPageViews()

for page in page_view:
    view_to_print = Rhino.Display.ViewCaptureSettings(page, dpi=500)
    # aplying output color mode
    view_to_print.OutputColor = Rhino.Display.ViewCaptureSettings.ColorMode.DisplayColor

    pdf_writer.AddPage(view_to_print)

pdf_writer.Write(destination_file)