显示衣橱,所有文本格式均在其extext

问题描述 投票:0回答:1

我想在itext pdf中显示所有格式的oracle clob数据。目前,我正在使用以下代码来显示它。

java.sql.Clob clob=rs.getClob("MESSAGE");
Reader r = clob.getCharacterStream();
char clobVal[] = new char[(int) clob.length()];
r.read(clobVal);
StringWriter sw = new StringWriter();
sw.write(clobVal);
//add some detail information about the country
doc.add(new Paragraph("Country Code: " + sw.toString(), bf12));

以上代码仅显示字符串,但没有文本格式或html格式数据。请帮忙。

java itext clob
1个回答
0
投票

PDF是二进制数据。 CLOB用于存储字符数据。使用BLOB,您将可以获取格式化的PDF。

© www.soinside.com 2019 - 2024. All rights reserved.