I have developed an ArcGIS Pro Add-in that allows users to insert several preconfigured elements into the layout. These elements are constructed using the ArcGIS Pro SDK. I need the font size of the text elements to adjust based on the layout page size.
To achieve this, I created a class called "Ark" (Norwegian for "Page") which contains functions to determine the page type (A0, A1, etc.) based on the layout page's height and width, and return the correct font size. This works fine when the user selects a page size from the Layout -> Size dropdown. However, if the user selects "Page from printer," the height and width values are incorrect.
For example, if the user selects ISO A4 portrait, the height should be 297 mm and the width 210 mm. But when using "Page from printer," the values returned from Layout.GetPage() are 286 mm (height) and 202 mm (width), even though the page chosen in the printer preference is ISO A4. Why do I get these differences?