Jan-Hendrik Lendholt wrote: > Hi there, > > I played araound any further but wasnt able to get this managed.
Add the following lines to your code before addTemplate(): System.out.println(mark_scale); System.out.println(h_trans); System.out.println(v_trans); You'll see that, although template.pdf and result.pdf have the same size, mark_scale isn't exactly equal to 1. Why not? Because the mediabox of result.pdf is /MediaBox[0 0 595.28 841.88] and the mediabox of template.pdf is [0 0 595 842] I don't think the decimals used in the mediabox of result.pdf make sense. I'd use the closest integer. What you are experiencing is a combination of problems with floating point math and accuracy with respect to the coordinate system for measurements that are less than one point. -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/