开发者

Using a stylesheet with iText, possible?

Does iText provide/support for any kind of styling sheet?

What I mean is, like in Apache FOP, the data is represented in the XML and the formatting is programmed in the XSL. So then we pass the XML and XSL to the FOP engin开发者_StackOverflowe which in turn converts the data in XML using the formatting specified in the XSL to create a PDF.

Does iText support a similar functionality or the only way we have is to program the whole formatting in the Java code itself, meaning specifying the table/cell(its dimensions etc.), paragraph(its font, color etc.)?


iText isn't FOP, no. The only way is to program the whole formatting in the java code itself. OTOH, Your program could read formatting information from various files in the format of your choice, but you'd have to write that code yourself.

iText in Action 2nd ed has a sample that outlines building an XML parser and using that to feed iText. Nothing about style info other than what's written in the code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜