Thanks for the suggestion - very interesting, as I have not yet read about
generic tags and page events. Will definitely look into it now.

Some comments for further consideration:

1. The font to be used can be any font - not necesserily a monospaced font.

2. I can foresee a possible problem at the joins, as horizontal lines are
positioned vertically at the middle of the text height, while vertical lines
will be drawn at full height of the text (top to bottom).

... and yes, a fun project indeed :-)

Thanks,

JB




On Wed, Apr 22, 2009 at 4:59 PM, 1T3XT info <[email protected]> wrote:

> Java Developer wrote:
> > I would appreciate your advise on the best strategy to implement this
> > using the iText API.
>
> A possible strategy (it might not be the best one, but it's where I
> would start if I were asked to do this), is:
>
> * first select a monospaced font (for instance courier).
>   Why? Seems like the plain text file is formatted that way.
> * write my own parser that creates chunks.
>   If one "*" create a chunk with a (non-breaking-)space character
>   and add a generic tag with text "vertical"
>   If more "*" create a chunk with as many (non-breaking?) space
>   characters as there are "*" and add a generic tag with text
>   "horizontal"
>   If no "*" create a chunk with the content.
> * implement page events so that a short vertical line is drawn on
>   "vertical" tags and a horizontal line on "horizontal" tags.
>
> This will demands some trial and error to get the lines correct,
> but it should be fun writing something like this. (Also: there's
> no guarantee it will works: that will depend largely on the shape
> your input files are in.)
> --
> This answer is provided by 1T3XT BVBA
> http://www.1t3xt.com/ - http://www.1t3xt.info
>
>
> ------------------------------------------------------------------------------
> Stay on top of everything new and different, both inside and
> around Java (TM) technology - register by April 22, and save
> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
> 300 plus technical and hands-on sessions. Register today.
> Use priority code J9JMT32. http://p.sf.net/sfu/p
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> Buy the iText book: http://www.1t3xt.com/docs/book.php
>
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to