JAVA Openhtmltopdf(flyingsource)库为什么文本对齐对齐不起作用?
下面是由Tidy库生成的内容,pdf显示不正确,openhtmltopdf库不支持吗?或者Tidy提供的内容是错误的?请帮助我的星期JAVA Openhtmltopdf(flyingsource)库为什么文本对齐对齐不起作用?,java,css,pdf-generation,tidy,openhtmltopdf,Java,Css,Pdf Generation,Tidy,Openhtmltopdf,下面是由Tidy库生成的内容,pdf显示不正确,openhtmltopdf库不支持吗?或者Tidy提供的内容是错误的?请帮助我的星期 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator"
content="HTML Tidy for Java (vers. 2009-12-01), see jtidy.sourceforge.net" /><style
type="text/css">
/*<![CDATA[*/
p {
text-align: justify;
text-justify: inter-word;
}
/*]]>*/
</style>
<title>
</title>
</head>
<body>
<p style="text-align: justify;">
this is my text, this is my text, this is my text, this is my text,
this is my text, this is my text, this is my text, this is my text,
this is my text, this is my text,
this is my text, this is my text, this is my text, this is my text,
this is my text, this is my text,
this is my text, this is my text.
</p>
</body>
</html>
/**/
这是我的文本,这是我的文本,这是我的文本,这是我的文本,
这是我的文本,这是我的文本,这是我的文本,这是我的文本,
这是我的文本,这是我的文本,
这是我的文本,这是我的文本,这是我的文本,这是我的文本,
这是我的文本,这是我的文本,
这是我的文本,这是我的文本。
不是因为没有包含换行符吗?在这种情况下,无论源有多破碎,渲染时都会将其解释为好像是同一条线。您必须使用标签来断开:<p style="text-align: justify;">
this is my text, this is my text, this is my text, this is my text, <br/>
this is my text, this is my text, this is my text, this is my text, <br/>
this is my text, this is my text, <br/>
this is my text, this is my text, this is my text, this is my text, <br/>
this is my text, this is my text, <br/>
this is my text, this is my text.
</p>
这是我的文本,这是我的文本,这是我的文本,这是我的文本,
这是我的文本,这是我的文本,这是我的文本,这是我的文本,
这是我的文本,这是我的文本,
这是我的文本,这是我的文本,这是我的文本,这是我的文本,
这是我的文本,这是我的文本,
这是我的文本,这是我的文本。