for_rendering_by_scale_factor method
Leave feedback
On this page
Initializes a CadOptions instance for rendering by scale factor.
For code example, see the documentation.
def for_rendering_by_scale_factor(cls, scale_factor):
...
| Parameter | Type | Description |
|---|---|---|
| scale_factor | float |
Value higher than 1 enlarges output result; value between 0 and 1 reduces output result. |
Returns: CadOptions: New instance of the CadOptions class for rendering by scale factor.
| Raises | Description |
|---|---|
ValueError |
Raised when scale_factor is less or equal to zero. |
from groupdocs.viewer import Viewer
from groupdocs.viewer.options import PngViewOptions, CadOptions
def set_image_size():
with Viewer("sample.dwg") as viewer:
png_options = PngViewOptions("set_image_size/image_with_size_limits.pdf")
png_options.cad_options = CadOptions.for_rendering_by_scale_factor(0.5)
viewer.view(png_options)
if __name__ == "__main__":
set_image_size()
- class
CadOptions
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.