> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Markus Friese > Sent: Thursday, March 02, 2006 1:27 PM > To: [email protected] > Subject: [iText-questions] Re: PDFGraphics2D and Swing borders > > > Paulo Soares <psoares <at> consiste.pt> writes: > > > > > > > ----- Original Message ----- > > From: "Katz, Neal" <neal.katz <at> credit-suisse.com> > > To: "'Paulo Soares'" <psoares <at> consiste.pt>; "Katz, Neal" > > <neal.katz <at> credit-suisse.com>; <itext-questions <at> > lists.sourceforge.net> > > Sent: Wednesday, March 01, 2006 1:45 PM > > Subject: RE: [iText-questions] PDFGraphics2D and Swing borders > > > > > > > > Is there any plan to fix this in an upcoming release? > > > > No. I don't use Graphics2D and I've plenty of other things > to do in iText. > > > > > > > > If not, can you suggest a general strategy by which I can > patch the > > > problem? > > > > It's not easy. It currently creates a new instance of > PdfGraphics2D each > > time create() is called and all the instances are added at > the end in > > dispose(). It should create the instances as it does but > insert them in the > > position where created() was called. The problem is keeping > track of the > > graphic state. > > > > Paulo > > > > > > > > -----Original Message----- > > > From: Paulo Soares [mailto:psoares <at> consiste.pt] > > > Sent: Wednesday, March 01, 2006 6:34 AM > > > To: Katz, Neal; itext-questions <at> lists.sourceforge.net > > > Subject: Re: [iText-questions] PDFGraphics2D and Swing borders > > > > > > > > > That's not fixed. It's a drawing order problem caused by create(). > > > > > > ----- Original Message ----- > > > From: "Katz, Neal" <neal.katz <at> credit-suisse.com> > > > To: <itext-questions <at> lists.sourceforge.net> > > > Sent: Tuesday, February 28, 2006 10:21 PM > > > Subject: [iText-questions] PDFGraphics2D and Swing borders > > > > > > > > >> > > >> Hi, > > >> > > >> I'm using an old version of iText (downloaded in 2004) > without any of the > > >> fancy API calls. I create a PDFGraphics2D object and > pass it in to the > > >> standard paint methods in my Java code. Overall, this > works fine except > > >> for 1 thing: borders. I have a spreadsheet component > created with Java > > >> Swing classes and each cell is painted as a JLabel with > a Swing border > > >> object. The JLabel component paints fine but the border > does not seem to > > >> paint (I've confirmed that the paintBorder method is > being called). The > > >> result is a spreadsheet missing grid lines. > > >> > > >> I haven't found this issue mentioned anywhere - is it > known or has this > > >> been fixed in a later release? > > >> > > >> Thanks, > > >> > > >> Neal Katz > > >> > > >> > ============================================================== > ================ > > >> Please access the attached hyperlink for an important electronic > > >> communications disclaimer: > > >> > > >> http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html > > >> > ============================================================== > ================ > > >> > > >> > > >> > > >> ------------------------------------------------------- > > >> This SF.Net email is sponsored by xPML, a groundbreaking > scripting > > >> language > > >> that extends applications into web and mobile media. > Attend the live > > >> webcast > > >> and join the prime developer group breaking into this new coding > > >> territory! > > >> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720& > dat=121642 > > >> _______________________________________________ > > >> iText-questions mailing list > > >> iText-questions <at> lists.sourceforge.net > > >> https://lists.sourceforge.net/lists/listinfo/itext-questions > > > > > > > > > > ============================================================== > ================ > > > Please access the attached hyperlink for an important electronic > > > communications disclaimer: > > > > > > http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html > > > > ============================================================== > ================ > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by xPML, a groundbreaking > scripting language > > that extends applications into web and mobile media. Attend > the live webcast > > and join the prime developer group breaking into this new > coding territory! > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720& > dat=121642 > > > > > Hi, > > I had the same problem. The paint methods from Swing > components often use > SwingGraphics.createSwingGraphics(g) to create a new graphic context > derived from the existing context. This results in a call > PDFGraphics2D.create > () which returns a new PDFGraphics2D object. The new object > owns a duplicate > from the underlying PDFContentByte instance. And in my > opinion the newly > created PDFContentByte instance has no affect for the pdf > document. I solved > the problem > with a few changes. I don't know exactly, if its correct but > it works fine > for us. > > Changes in PDFGraphics2D.create(): > > Old: > g2.cb = this.cb.getDuplicate(); > > New: > g2.cb = this.cb; > > > And: > > Old: > g2.kid = true; > synchronized (kids) { > kids.add(g2); > } > > New: > g2.kid = false; >
It won't work if the transform is changed. Paulo > Markus > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking > scripting language > that extends applications into web and mobile media. Attend > the live webcast > and join the prime developer group breaking into this new > coding territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720& > dat=121642 > _______________________________________________ > iText-questions mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/itext-questions > ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
