Hi,

thanks, there is a rectangle now. But, once again, at the wrong position.
You told me to move my JTable with cb.transform() but how can I move the
rectangle? transform doesn't work here. I want to use it as a border for my
JTable.

Some code:

PdfContentByte cb = writer.getDirectContent();
                        
AffineTransform at = new AffineTransform();
at.translate(184.0, -141.5);
cb.transform(at);
                        
Graphics2D g2 = cb.createGraphics(500, 650);
cb.saveState();
g2.clipRect(0, 0, 500, 256);
                        
table.print(g2);
g2.dispose();
                
cb.rectangle(0,0,500,256);
cb.stroke();
                
cb.restoreState();

I also attach the resulting pdf-file.

Best Regards,

Katrin


> You also need a cb.stroke() or cb.fill() after the rectangle. 
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED] 
> > [mailto:[EMAIL PROTECTED] On 
> > Behalf Of [EMAIL PROTECTED]
> > Sent: Monday, January 10, 2005 7:44 AM
> > To: [email protected]
> > Subject: [iText-questions] PdfContentByte -another question
> > 
> > Hi,
> > 
> > first of all I'd like to thank Paulo for explaining to me how 
> > to move a
> > JTable graphic which is in a PdfContentByte. Everything works well.
> > 
> > But my JTable has lost two borders and I want to repaint them. But
> > cb.rectangle() does nothing. I also tried graphics.drawLine, 
> > but either the
> > border is painted or the JTable. But I want both at the same time...
> > 
> > Any idea how I can do this?
> > 
> > Thanks in advance
> > 
> > Regards,
> > 
> > Katrin
> > 
> > -- 
> > +++ GMX - die erste Adresse f�r Mail, Message, More +++
> > 1 GB Mailbox bereits in GMX FreeMail http://www.gmx.net/de/go/mail
> > 
> > 
> > -------------------------------------------------------
> > The SF.Net email is sponsored by: Beat the post-holiday blues
> > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
> > It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
> > _______________________________________________
> > iText-questions mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/itext-questions
> > 
> 

-- 
+++ GMX - die erste Adresse f�r Mail, Message, More +++
1 GB Mailbox bereits in GMX FreeMail http://www.gmx.net/de/go/mail

Attachment: test1.pdf
Description: Adobe PDF document

Reply via email to