@Nico_de_Meester wrote:
Hi
It try to script in python a PDF output from the current view to a predefined map and file name but I doesn’t get to the result I like.
import rhinoscriptsyntax as rs
def PrintCurrentView():
doc=rs.DocumentName()printer='RhinoPDF' dir="C:\\pdf_output\\" Name='test.pdf' cmd='-_Print Setup Margins TopMargin=5 BottomMargin=5 LeftMargin=5 RightMargin=5 _Enter ' cmd+='Destination ' cmd+='OutputColor PrintColor ' cmd+='Pagesize 297.0 210.0 ' cmd+='OutputType=Raster _Enter ' cmd+='View ViewportArea=Viewport _Enter ' cmd+='Visibility Footer '+doc+' _Enter ' #cmd+="_Enter _GO "+dir+Name+' ' cmd+='_Enter Preview ' rs.Command(cmd) return
if name==“main”:
PrintCurrentView()I like to use the Commented row to predefine the file location and name but it doesn’t work.
Or is the another way to print the current view as and PDF to a predefined map and name?
Posts: 3
Participants: 2