1
flying-saucer
에 대한 경험이있는 사람이 있습니까? xhtml
페이지를 png
으로 렌더링하고 있지만 최종 결과는 항상 16 픽셀입니다. 나머지는 잘립니다.플라잉 받침 - html에서 png로 항상 높이 16 픽셀 렌더링
Java2DRenderer renderer = new Java2DRenderer(xHtmlFile, width); // Image height should be set automatically
BufferedImage buffImg = renderer.getImage(); // buffImg.getHeight always 16
물론 xhtml 문서는 더 커야합니다.
그것은 다음은이
<body>
<div id="divThing">
<span>text</span>
<span>more text</span>
</div>
<body>
처럼, 그것은 몇 span
요소를 기본적으로 하나 div
있어 CSS를있다 :
html
{
color: #222;
font-size: 1em;
line-height: 1.4;
font-size:20px;
}
body
{
width:600px;
}
#divThing
{
position: absolute;
font-size:20px;
word-wrap:break-word;
word-wrap:break-all;
width:600px;
}