Damien Drix wrote:
> Hello,
> 
> In my application, I needed greater control over the rendering of text 
> than the standard high-level iText API allows. For example, I had to 
> support several line spacing modes, text wrapping around an arbitrary 
> shape, etc.

You can go a long way with ColumnText and/or PdfContentByte.
Only text wrapping around a shape is not possible (you can
have irregular columns, but you can't put an image in the
middle of a big chunk of text).

> To this end, I've been using low-level text processing classes such as 
> BidiLine, PdfLine and PdfChunk (and also, 
> PdfDocument.writeLineToContent()). As some of the required methods were 
> protected or package-private, I had to declare one of my paragraph 
> rendering classes as part of the com.lowagie.text.pdf package (luckily, 
> the iText jar is not sealed).

That's fine if you know what you are doing (and apparently
you know), but I wouldn't advice first-time users to open
up classes like BidiLine, PdfLine and PdfChunk ;-)

> It works perfectly well, but one is always a bit reluctant to use 
> non-public members, and I think the low-level iText API would benefit 
> from the text processing tools being made public.
> Do you think that could be done in a future release? This part of the 
> code seems to be already quite mature and of API-grade quality, so it 
> could be a simple matter of changing access permissions. Of course, this 
> is not at all an urgent request, just a suggestion ;)

I'm not sure if opening up the API would be a good thing,
especially if we don't provide good documentation (I wrote
an 'Under the hood' chapter for the book, but it didn't
discuss the classes you mention).

My main problem isn't of a technical nature. It's just that
there are plenty of newbies out there and when they find an
example (any example) or a class (for instance PdfTable,
not PdfPTable), they fiddle with it the wrong way. Afterwards
they complain on the mailing list that it doesn't work
(or even worse: to me personally). If we open up classes
like PdfLine, this risk gets higher.

But maybe I'm just being too pessimistic about it...
I'm not against it; it's a good suggestion, but I would
like to hear why ColumnText wasn't sufficient for your
needs, and of course I also want to hear what Paulo thinks
about it.

best regards,
Bruno

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to