Hi @Asterisk I recorded a short video showing how to scale linetype styles and get italic non-native fonts with Rhino PDF. Do these methods work for you? I found a bug as well with editing text within a group that I filed as https://mcneel.myjetbrains.com/youtrack/issue/RH-58645 for future reference. This may have been the issue preventing you from setting the non-native font to Italic.
I’m not a Python user myself but did show how to export the extents of the selection in the export dialog. If you need assistance on a Python script post what you have to the scripting category please for feedback.
Thanks, Brian!
Oh man, I knew linetype scale was there… This was easy.
So, running Export command works to set proper printing area, but I need to have it scripted where I can export 100-300 part drawings by just pressing a button to run the script. So I kinda need Steve to chime in to tell me how to Export with “Selected Extents” option in python. We can skip the fonts issue, 'cause we can just find some other font that gets exported in italics.
It’s the control of area of export in pdf in python is what I really lack at the moment. It would be a blessing if we get rid of pdf driver printing, 'cause that guy always prints in raster…
import scriptcontext as sc
import System.Drawing
import rhinoscriptsyntax as rs
# create a new PDF document
pdf = Rhino.FileIO.FilePdf.Create()
dpi = 600
size = System.Drawing.Size(11*dpi, 8.5*dpi)
settings = Rhino.Display.ViewCaptureSettings(sc.doc.Views.ActiveView, size, dpi)
# add 1 or more pages based on ViewCaptureSettings
pdf.AddPage(settings)
#write the pdf file to disk
pdf.Write(rs.DocumentPath() + "test.pdf")
You may be able to get close to what you are after by zooming your active view to a bounding box before creating your settings sc.doc.Views.ActiveView.MainViewport.ZoomBoundingBox(bbox)
Where bbox is the bounding box of the world rectangle that you are trying to print.