Hi, I just want to render a tiny rectangle at the top of the pdf. I know that 0,0 is bottom-left in the iText spec.
consider this code. When I look at the pdf the rectangle is at the top of the pdf page. Why isn't it 10 points down from the top of the pdf? I've used heigth - 10? float height = 720f; float width = 360f; Rectangle bounds = new Rectangle(width, height); bounds.setBackgroundColor( Color.green); /** * Always construct the document before open the stream */ Document document = new Document( bounds ,0,0,0,0); try{ PdfWriter writer = PdfWriter.getInstance( document,new FileOutputStream( "test.pdf" )); document.open(); PdfContentByte cb = writer.getDirectContent(); cb.roundRectangle( 10, height - 10 , 10, 10, 0); cb.fill(); }catch( Exception e){ e.printStackTrace(); } document.close(); -- View this message in context: http://www.nabble.com/Simple-example-top%2C-bottom-tp23545844p23545844.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-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/