linuxunil wrote > 8.26 X 11.69 in (INCORRECT! 8.3 X 11.7 in) Which source tells you 8.3 X 11.7 in is the exact and only A4 size?
First of all, 8.3 X 11.7 in is the 8.26 X 11.69 in rounded to one decimal digit, and even 8.26 X 11.69 in is not exact, merely rounded. Please be aware that the An formats are defined by some criterion and then rounded to the nearest millimeter. Thus, the size in inches usually has numerous decimal digits. Assuming a single decimal number to be exact, therefore, is presumptuous. Furthermore, the standard also defines tolerances. If the size differs by nor more than that tolerance from the 'exact' value, the format still is An. > //check page is A4 > if(heightSize == 11.7f && widthSize == 8.3f){ > isA4Sized = true; > } else { > isA4Sized = false; > } This shows that the person who implemented the validation code not only has not understood ISO 216 (which defines most of the An sizes) but also has not understood floating point numbers. Almost always doing '==' on floats is nonsense. Regards, Michael -- View this message in context: http://itext-general.2136553.n4.nabble.com/java-A4-page-size-is-wrong-in-PageSize-A4-tp4659791p4659792.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Flow-based real-time traffic analytics software. Cisco certified tool. Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer Customize your own dashboards, set traffic alerts and generate reports. Network behavioral analysis & security monitoring. All-in-one tool. http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php