Using inches in MarginInfo

I am not clear on what I can and cannot use 'inches' for. The documentation says that in the MarginInfo class I can use "12inch" or "12cm", as well as points, but whenever I try to do that I get an exception: string cannot be converted to float. This is my code (just for the marginInfo piece):

MarginInfo _imgMarg = new MarginInfo();

_imgMarg.Top = "1inch";

_imgMarg.Left = "3inch";

If I remove the quotes I also get an error.

What I am really trying to do is use inches to layout my page. I need to use inches to place images on certain size pdf documents that will be ready for printing. I wanted to use floatingbox, but that does not seem to take inches.

Any thoughts?

Thanks,

Eric

Dear Eric,

"inch" and "cm" is only supported in XML. In API you have to convert "inch" or "cm" into points. Sorry for the inconvenience.