GroupDocs.Viewer also provides the feature to set limits for width/height for the output image. Follow the below steps to achieve this functionality.
If you set MaxWidth/MaxHeight options, if the image exceeds one of these limits - it will be resized proportionally.
/**
* Limits of image size options interface.
*/publicinterfaceIMaxSizeOptions{/**
* Max width of an output image in pixels.
*/intgetMaxWidth();/**
* Max width of an output image in pixels.
*/intsetMaxWidth();/**
* Max height of an output image in pixels.
*/intgetMaxHeight();/**
* Max height of an output image in pixels.
*/intsetMaxHeight();}
Note: If you set Width/Height in options, MaxWidth/MaxHeight options will be ignored.
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.