I'm a javascript novice, I have this bit of code in a jsx script that I would like to resize the canvas +20 percent on both horizontal and vertical sides.
resizeCanvas = docRef.resizeCanvas(curWidth + 20, curHeight + 20, AnchorPosition.MIDDLECENTER);
20 refers to whatever unit the ruler is set to. (inches, pixels, centimeters, etc).
What is the proper method of resizing the canvas by 20 PERCENT?
I suspect that I may have to change the units before the resizeCanvas to Units.PERCENT and then back to the default after resizing. To me, that seems to be a lot of typing, is there a better method?