Stepan, as the compiler shows, 8.1 is a double, not a float. Use 8.1f or (float)8.1 and everything compiles just fine.
Michael. -----Original Message----- From: Stepan RYBAR [mailto:[EMAIL PROTECTED] Sent: Thursday, November 13, 2008 8:49 AM To: [email protected] Subject: Re: [iText-questions] FOP 0.95 and iText 2.1.3 unable to do exactoverprint Hello, yes, You are right, that in JavaDoc is float and not int, but when I use following code: over.showTextAligned(Element.ALIGN_LEFT, omr, 8.1, 666, 90); I receive following error during compilation: C:\temp\Apache FOP User Data>"C:\Program Files\Java\jdk1.6.0_10\bin\javac" -cp " iText-2.1.4.jar" AddPageNumbersToExistingPageNumberPDF.java AddPageNumbersToExistingPageNumberPDF.java:121: cannot find symbol symbol : method showTextAligned(int,java.lang.String,double,int,int) location: class com.lowagie.text.pdf.PdfContentByte over.showTextAligned(Element.ALIGN_LEFT, omr, 8.1, 666, 90); ^ 1 error while when I use integer value: over.showTextAligned(Element.ALIGN_LEFT, omr, 8, 666, 90); compilation and running is OK. I am using Sun Java SDK 1.6.0_10 64bit version on MS Windows Vista Enterprise 64bit EN with Czech regional settings. You can see my whole simple Java code in attachment. There is still chance, that I can make some fatal mistake in my Java code, but I hope not so. Stepan > ------------ Původní zpráva ------------ > Od: mister bean <abinstock@> > Předmět: Re: [iText-questions] FOP 0.95 and iText 2.1.3 unable to do > exact overprint > Datum: 13.11.2008 08:07:16 > ---------------------------------------- > > Not sure if this is the answer, but I don't understand why you say > that the > showTextAligned() uses integers. In fact, it uses floating-point > values. See the Javadoc > http://1t3xt.info/api/com/lowagie/text/pdf/PdfContentByte.html#showTex > tAligned(int,%20java.lang.String,%20float,%20float,%20float,%20boolean > ) > > Likewise, setFontAndSize() takes a floating-point value. Again, look > at the JavaDoc. > > I suspect that you can tweak the values to fit perfectly. > > ---mr. bean > -- "Feel free" - 5 GB Mailbox, 50 FreeSMS/Monat ... Jetzt GMX ProMail testen: http://www.gmx.net/de/go/promail ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php
