Post the rules and I'll see where I can fit them. Best Regards, Paulo Soares
> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Ito Kazumitsu > Sent: Wednesday, October 27, 2004 7:47 AM > To: [EMAIL PROTECTED] > Subject: [iText-questions] End/Beginning of Line troubles > > Hi, > > I am using iText with the attached dirty patch. > > This patch is needed for Japanese text processing, which has > such rules as "some characters should not appear at the beginning > of a line" and "a line should not end with some characters". > > My patch is far from complete to respect such rules. > > Could iText cope with this situation? > > --- com/lowagie/text/pdf/PdfChunk.java.orig Sat Feb 7 19:28:39 2004 > +++ com/lowagie/text/pdf/PdfChunk.java Wed Oct 27 15:28:06 2004 > @@ -327,6 +327,13 @@ > } > if (currentWidth > width) > break; > + if ((currentPosition <= value.length() - 2) && > + (value.charAt(currentPosition + 1) == '\u3001' || > + value.charAt(currentPosition + 1) == '\u3002') && > + (currentWidth + > font.width(value.charAt(currentPosition + 1)) > width)) { > + splitPosition = currentPosition; > + break; > + } > // if a split-character is encountered, the > splitPosition is altered > if (splitCharacter.isSplitCharacter(character)) > splitPosition = currentPosition + 1; > @@ -358,6 +365,13 @@ > } > if (currentWidth > width) > break; > + if ((currentPosition <= value.length() - 2) && > + (value.charAt(currentPosition + 1) == '\u3001' || > + value.charAt(currentPosition + 1) == '\u3002') && > + (currentWidth + > font.width(value.charAt(currentPosition + 1)) > width)) { > + splitPosition = currentPosition; > + break; > + } > // if a split-character is encountered, the > splitPosition is altered > if (splitCharacter.isSplitCharacter(character)) > splitPosition = currentPosition + 1; > > > ------------------------------------------------------- > This SF.Net email is sponsored by: > Sybase ASE Linux Express Edition - download now for FREE > LinuxWorld Reader's Choice Award Winner for best database on Linux. > http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click > _______________________________________________ > iText-questions mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/itext-questions > ------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_idU88&alloc_id065&op=click _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions