Thanks for the help. I realize now that you just have to accept the origin of botton left. I found a reference to the PDF ref guide from Adobe, downloaded it, and now have a better idea of what's going on. Thanks very much!
Is the AffineTransform a class in the released iText library? I couldn't find it in the JavaDoc. Ken -----Original Message----- From: Paulo Soares [mailto:[EMAIL PROTECTED] Sent: Saturday, October 04, 2003 9:46 AM To: Rimple, Ken; [EMAIL PROTECTED] Subject: Re: [iText-questions] Some questions about PdfContentByte... ----- Original Message ----- From: "Ken Rimple" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, October 03, 2003 12:16 Subject: [iText-questions] Some questions about PdfContentByte... > I am generating a PDF report that has mixed landscape and portrait > styles > for various pages. > For some pages, I'm importing the raw PDF of a page and drawing on top > of > it. For those pages: > > 1. Why is the origin 0,0 on the bottom left for text and graphics?? I > was > able to compensate > for this for graphics by doing math (translate to doc height - (x + > image size)) but doesn't > seem to be all that easy for a font. That the way PDFs work. > 2. I attempted to understand the translation matrix but can't get it to > make the origin top/left You can use an AffineTransform. > 3. It appears that I can't set font styles for a contentbyte.showText > or > showTextAligned--is > this true? I need to overlay a bold font in some cases, maybe even > an > underlined one. I'm > trying to do this with Arial, and it doesn't seem to take the > font's > style or size into account > when I ask for the basefont (which is what PdfContentByte > requires). > You can do it with ColumnText.showTextAligned(). See the example alignCT.java in itextpdf.sf.net. > Basically I got seduced into this library from the simple layout engine, > but > when I started using the absolute layout I got confused about these > items. > It's a great library, but I'm just trying to use the > absolute positioning and am getting lost. The translation matrix stuff > seems like voodoo for me > (admittedly a math idiot) and all I want to do is think top/left for my > coordinate system without > doing a ton of work. Are these simple questions? I didn't find > anything in > the tutorial or examples > that would help. It's a lot easier to accept the bottom left coordinate system than to do it the other way as fonts need a special treatment to keep them from showing upside down. It can be done, of course. If you really want to do it see PdfGraphics2D.java. Best Regards, Paulo Soares ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions
