PDF export physical size on Mac
Not sure if this is a bug or a documentation error.
I can't get PDFs to export to a defined height on Mac. This is needed in my Scaled Perspectives2 extension to export drawings to scale.
The documentation neither specifies a unit or a data type for the imageHeight setting, but logically one of these 4 exports aught to be 10 times the height of one of the others. Yet they are all the same size.
dir = UI.select_directory
Sketchup.active_model.export(
"#{dir}/pdf size test 1.pdf",
imageHeight: 1
)
Sketchup.active_model.export(
"#{dir}/pdf size test 1.0.pdf",
imageHeight: 1.0
)
Sketchup.active_model.export(
"#{dir}/pdf size test 10.pdf",
imageHeight: 10
)
Sketchup.active_model.export(
"#{dir}/pdf size test 10.0.pdf",
imageHeight: 10.0
)
On Windows you can do the following to export a PDF to a defined size.
path = UI.savepanel("Export PDF")
path = "#{path}.pdf" unless path.end_with?(".pdf")
Sketchup.active_model.export(
path,
height_units: Length::Inches, # Length::Millimeter not supported.
window_height: 20.0 # Integer and Length not supported.
)
Forum thread: https://forums.sketchup.com/t/does-the-pdf-exporter-even-accept-settings/110582/7
@nickAtSketchUp or @hilliard-sketchup - any ideas about this one?
Hilliard_Scott, said in post:11, topic:110582 ...
There are errors in the documentation for PDF export on Mac. The options linked to pdf export are named:
image_height(notimageHeight)image_width(notimageWidth)line_weight
SU-45220
Closing this issue as fixed with SU2026.0 for Mac.