简体   繁体   English

使用带有iText的样式表可能吗?

[英]Using a stylesheet with iText, possible?

Does iText provide/support for any kind of styling sheet? iText是否提供/支持任何类型的造型?

What I mean is, like in Apache FOP, the data is represented in the XML and the formatting is programmed in the XSL. 我的意思是,就像在Apache FOP中一样,数据以XML表示,格式化在XSL中编程。 So then we pass the XML and XSL to the FOP engine which in turn converts the data in XML using the formatting specified in the XSL to create a PDF. 然后我们将XML和XSL传递给FOP引擎,FOP引擎又使用XSL中指定的格式转换XML格式的数据以创建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是否支持类似的功能,或者我们唯一的方法是在Java代码本身中编写整个格式,即指定表/单元格(其尺寸等),段落(字体,颜色等)?

iText isn't FOP, no. iText不是FOP,不是。 The only way is to program the whole formatting in the java code itself. 唯一的方法是在java代码本身中编写整个格式。 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. OTOH,您的程序可以以您选择的格式从各种文件中读取格式信息,但您必须自己编写该代码。

iText in Action 2nd ed has a sample that outlines building an XML parser and using that to feed iText. iText in Action 2nd ed有一个示例 ,概述了构建XML解析器并使用它来提供iText。 Nothing about style info other than what's written in the code. 除了在代码中编写的内容之外,没有任何关于样式信息的信息。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 是否可以使用 iText 按位置查找文本? - Is it possible to find the text by position using iText? 是否可以使用iText以弧形写入文本 - Is it possible to write text in an arc shape using iText 在iText中使用setEncryption方法时是否可以仅设置所有者密码? - Is it possible to set only owner password while using setEncryption method in iText? 是否可以使用 iText 获取现有 PDF 文档的元素? - Is it possible to get elements of an existing PDF document using iText? 是否可以在java中使用jasper或itext创建不可打印的pdf? - Is it possible to create non-printable pdf with using jasper or itext in java? 是否可以使用iText查找文本位置 - Is it possible to find text position with iText 是否可以使用-fx-graphic从JavaFX CSS样式表上的jar中引用图标? - Is it possible to refer icons from jars on JavaFX CSS stylesheet using -fx-graphic? 是否可以使用iText或其他一些API将PDF中的可填充字段定位到坐标? - Possible to position fillable field in PDF to a coordinate using iText or some other API? 是否可以在没有数据库连接的情况下使用iText在pdf文件中进行页面转换(类似于PowerPoint演示文稿)? - Is it possible to make page transition(similar to a PowerPoint presentation) in pdf files using iText without database connectivity? 是否可以使用iText以编程方式向“ Acroform”字段添加“打开Web链接操作”操作? - Is it possible to add 'Open a web link action' action to acroform field programmatically using iText?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM