Quoting Sakke Wiik <[EMAIL PROTECTED]>:

> > I thought you wanted XML as input?
> > If you want to do it programmatically,
> > you have all the functionality you need with PdfPTable.

> Sorry to confuse you. The input is plain data. I assumed it is easier to
> format the data from an external tagmap-file if the data was in xml(as done
> in the Shakespeare example). I have a customer who wants to be able to
> change fonts etc. without modifying the source code.

That's a design question.
As you know the complete background of the project.
You are best placed to make the choice.

> PdfPCell cell = new PdfPCell(new Phrase("text", "cell-attributes"));
> PdfPTable aTable = new PdfPTable(1);
> aTable.addCell(cell);
> document.add(aTable);
> document.setTagMap("tagmap.xml");

I see you work with PdfPTable and PdfPCell.
I think that's the best option, but I was a little bit
confused when you started talking about TagMap.
You can write your own TagMap functionality and define
some style parameters in it (subclass some iText classes
and read the TagMap in your own constructor).

You can get inspiration from the built-in TagMap class
functionality, but I don't think you can use it as-is
to achieve your goals.

br,
Bruno


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to