Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF export physical size on Mac #403

Open
Eneroth3 opened this issue Dec 9, 2019 · 3 comments
Open

PDF export physical size on Mac #403

Eneroth3 opened this issue Dec 9, 2019 · 3 comments

Comments

@Eneroth3
Copy link

Eneroth3 commented Dec 9, 2019

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

@thomthom
Copy link
Member

@nickAtSketchUp or @hilliard-sketchup - any ideas about this one?

@DanRathbun
Copy link

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 (not imageHeight)
image_width (not imageWidth)
line_weight

@jinyistyle
Copy link

SU-45220

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants