The units supported for setting the page size are as follows:point- cm- inch

In the article "Set Page Size and Margins" you say: The units supported for setting the page size are as follows:point, cm, inch
but on the next line you have warning: In API, only point unit is supported.
and also: In XML, PageSize is not supported and you can only use numbers.
This confuses me, since in the example below you mention again:
//Set the margin Top. This value is in points but other units like
//inches and centi meters can also be used as 12inch or 12cm
marginInfo.Top = 72;
Could you give me an example on how I can set a margin values if my values are as follows:
var leftmargin = "1.2cm";
var topmargin = "1cm";
Thank you,
Alex

Hi Alex,


Thanks for your inquiry. As mentioned in the article points are only supported in API. However you can use inch and cm measuring units in XML file. Please find attached a sample XML file for the purpose. Moreover, 72 Points= 1 inch so if you want to use cm or inches in API then you have to convert these into points accordingly. Hopefully it will help you to accomplish your requirements.

Please feel free to contact us for any further assistance.

Best Regards,

Hi Alex,


Thanks for contacting support and sorry for the confusion.

The page height and width properties use points as the basic unit, where 1 inch = 72 points and 1 cm = 1/2.54 inch = 0.3937 inch = 28.3 points. So as per your requirement, you can convert cm to Inch and perform required operation.