Quoting Steven Balthazor <[EMAIL PROTECTED]>:

> ===================================================
> if (ElementTags.HORIZONTALRULE.equals(name)) {
>       Graphic hr = new Graphic();
>       hr.setHorizontalLine(1.0f, 100.0f);
>       try {
>               document.add(hr);
>       }
>       catch(DocumentException de) {
>               throw new ExceptionConverter(de);
>       }
>       return;
> }
> =====================================================

> Working back through the code it appears that Section.java and
> Phrase.java do not allow a GRAPHIC object to be added to them with a
> .add(Object) method call.  Consequently the horizontalline was throwing
> a ClassCastException error which was not getting caught properly because
> the catch was only for an EmptyStackException.  So as far as I could
> tell the GRAPHIC object should always use the document.add functionality
> so I removed the pop/push code.

What if your Section spans multiple pages?
Aren't you adding the Graphic object on the wrong page?
I don't have a lot of time to look into the problem,
but maybe it would be better to allow a Graphic object
to be added to a Section, or even better: to implement
'horizontalrule' in the Chunk object as was done with 'newline'.

br,
Bruno


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to