Indesign CS6 size validation, js
Hi,
I am checking indesign document size through the script comparing it to order specs, and it works great with standard numbers (if I can call them that way), like 3.5x2, 4x6, 2.125x2.125, etc.
But when I get strange numbers, like 1.8x4.1, it tells me that size is wrong when size is correct. Why would it matter what kind of number it is and how I can make it work?
Here is my script (I check both orientations):
if((myXmlWidth == myPageWidth && myXmlHeight == myPageHeight) || (myXmlWidth == myPageHeight && myXmlHeight == myPageWidth)){
}else{
alert("Incorrect document size.");
exit();
}
Thank you
Yulia