I have implemented SplitCharacter and was hoping to have it split after
the close parenthesis ')', but not before this character, As such I
have something like:
public boolean isSplitCharacter(int start, int current, int end, char[]
cc, PdfChunk[] ck) {
char c;
if (ck == null)
c = cc[current];
else
c = ck[Math.min(current, ck.length -
1)].getUnicodeEquivalent(cc[current]);
if ((c ')') || (c==' ')) {
return true;
}
This appears to work in some situations such as the breaking of
"aaa)bbb" is correct and desired as:
aaa)
bbb
However, in the case where a closing parenthesis ends the line, it is
treating it as a "split before character". In other words, the line:
hello (test)
is split as follows:
hello (test
)
instead of what I want which is:
hello
(test)
According to the implicit definition "treat a split character as if it
can go at the beginning or end of a line" it is working, but what I
desire is "treat this split character as if it only can go on the end of
the line".
So my questions are:
1) Is there native support for this concept of the split character being
at the start or end of a contiguous set of characters?
2) If not, can I "force" it by breaking the text into chunks that are
stuck next to each other?
3) If breaking the text into chunks does not work, is the only real
remaining course of action to insert line breaks manually?
Thanks for any ideas,
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/