I am using the command line version of the “Print” command, “-Print”, to change page sizes for printing. Later on, I want to use this in a script.
_-Print _Setup _Destination _PageSize
gets me to a prompt saying “Width in mm”. Let’s say I want A2 landscape (European format) so I specify 594.0 and then 420.0 for the height. Now Rhino wrongly assigns 594 to the height parameter and 420 to the width parameter, which I can verify by trying “_PageSize” again or looking into the regular Printing Preview menu which shows the correct A2 format but in portrait mode. This happens for all formats I have tried (A4, A5,…), whenever I specify a valid pair of width/height values for a landscape format, Rhino automatically changes it to portrait. Also, it is independent of the selected printer.
I guess this is a bug report, please let me know if you guys can replicate it.
Hi Matthias- this is probably being switched by the printer driver, I’m told. The driver may set width and height to match the Landscape or Portrait setting so you may have to force it by setting the printer to use Landscape and not Portrait in this case. Does that do anything useful?
thanks for the input - it seems to happen independently from the selected printer, though.
However, your answer leads me to a follow up question / feature request: While I can switch from portrait mode to landscape and back within the Rhino print preview menu, I haven’t found a way of doing this from the command line. If I can’t force landscape/portrait mode by specifying width and height, maybe the “-Print” command line tool should have an option for that, which would do the equivalent of checking the correct box in the menu?
I am having a related problem. I am trying to print in A4 Portrait. When I set page layout to Portrait in the Page Layout, it changes, but when I try to print, it changes back to Landscape. I have tried saving Portrait as default page layout but it still keeps changing back to Landscape. Not sure if this is a bug, or something to do with my settings.
The -print command line options (set to landscape, or set dimensions with the right order) bugs seem to be still here in the latest V6 Serengeti.
We can’t get this command to properly print an A3 in landscape: -_Print _Setup _Destination _Printer ““Microsoft Print to PDF”” _PageSize 420.000 297.000 _Enter _View _AllLayout _Enter _Enter _Go
Any chance to get this working in V6? Or do you have a workaround?
The double quotes are here because the command is used from VB, like this:
Rhino.RhinoApp.RunScript("-_Print _Setup _Destination _Printer ““Microsoft Print to PDF”” _PageSize 420.000 297.000 _Enter _View _AllLayout _Enter _Enter _Go", False)
Thanks for the hint but I’m still getting the same portrait A3 with this command:
Rhino.RhinoApp.RunScript(“-_Print _Setup _Destination _Printer chr(34) Microsoft Print To PDF chr(34) _PageSize 420.000 297.000 _Enter _View _AllLayout _Enter _Enter _Go”, False)
or this one:
Rhino.RhinoApp.RunScript(“-_Print _Setup _Destination _Printer chr(34) Microsoft Print To PDF chr(34) _PageSize 297.000 420.000 _Enter _View _AllLayout _Enter _Enter _Go”, False)
And what I need is landscape A3.
This is for a plugin that is going to be deployed on many brand new Rhino installation, so using a manual print first in landscape to keep settings is not an option.
@mathias - the next WIP will allow the width and height to correctly orient the print… is that sufficient, or were you looking for a command line toggle that would force the print orientation? (regardless, I guess, of the ordering of the numbers- they would just be page size.)