Hi,

On Friday 12 September 2008 11.44:39 Paulo Soares wrote:
> There are lots of layers when using complex objects. You should draw your
> background with PdfPCellEvent, probably.

Works great, but not when the PdfPTable is added into a Phrase. It acts like 
the table was never added... but if I look into the Phrase after insertion, I 
can see the PdfPTable element in it.

There is even a piece of code in the Phrase.add() method that makes me think 
it's supposed to be supported:
                case Element.PTABLE: // case added by mr. Karen Vardanyan
                        // This will only work for PDF!!! Not for RTF/HTML

Here is the code I use to create the table:
================
    public static PdfPTable createPlaceholderTable(double width,
            double height, PdfPTableEvent drawer) {
        PdfPTable placeHolderTable = new PdfPTable(1);
        placeHolderTable.setLockedWidth(true);
        placeHolderTable.setTotalWidth((float) width);
        final PdfPCell placeHolderCell = new PdfPCell();
        placeHolderCell.setMinimumHeight((float) height);
        placeHolderCell.setPadding(0f);
        placeHolderCell.setBorder(PdfPCell.NO_BORDER);
        placeHolderTable.addCell(placeHolderCell);
        placeHolderTable.setTableEvent(drawer);
        placeHolderTable.setComplete(true);
        return placeHolderTable;
    }
================

It works if I insert that into another cell/table, in the document, but not in 
a Phrase.

Any idea?

Thanks

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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