Has anyone here gotten word-wrap: break-word
to work in flying-saucer
? I'm rendering html to png
in flying-saucer
. I can find a 3 years old topic here with a supposed fix, but I can't recompile flying-saucer by myself, since they didn't include their dependencies into their download. Then I tried to build it using their build.xml
in eclipse, but it's lacking a javac task.
I tried using a table
with table-layout:fixed
, flying-saucer ignores that as well. Has anyone succeeded with this before?
Attached you will find a sketch of my problem.
my div in a browser
________________
| |
|WWWWWWWWWWWWWWWW|
|WWWWWWWWWWWWWWWW|
|WWWWWWWWW |
|________________|
my div in flying-saucer
________________
| |
|WWWWWWWWWWWWWWWW|WWWWWWWWWWWWWWWWWWWWWWWWW
|________________|
我自己并不熟悉飞碟,但在标签说明中它说它是CSS 2.1内容的渲染器, 自动换行是CSS 3
I've stumbled upon this question and found that using word-wrap: break-word
actually is possible using Flying Saucer.
It is true that word-wrap is CSS 3 but the discussion you linked mentions a commit that adds support for word-wrap
to Flying Saucer. This change is included in the versions of Flying Saucer distributed through Maven . Make sure you're using at least version 9.0.0.
I have faced the similar issue and used word-break : break-all; This was fixed.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.