danfickle / openhtmltopdf

An HTML to PDF library for the JVM. Based on Flying Saucer and Apache PDF-BOX 2. With SVG image support. Now also with accessible PDF support (WCAG, Section 508, PDF/UA)!
https://danfickle.github.io/pdf-templates/index.html
Other
1.93k stars 359 forks source link

css expression word-break:break-all; doesn't work. #113

Open wonder13662 opened 7 years ago

wonder13662 commented 7 years ago

Hi, I'm really enjoying your awesome product. but there's some itchy issue I found.

I've been trying several times, but css word-break:break-all; doesn't work at all. As you see below my 'LOOOOOOOOOOOOOOOOOOOOOOOONG!!' text is over its parent's width. It would be great for any feedback or help from you. Thanks in advance.

Here's my raw html text. sample.txt Tested in here. https://sandbox.openhtmltopdf.com/

Bests,

Wonder Jung.

danfickle commented 7 years ago

Hi @wonder13662 Could you try instead: word-wrap: break-word;

I think this is non standard.

wonder13662 commented 7 years ago

Hi, danfickle! Thanks for kind response!

Fortunately I've tried that- break-word and it works perfectly! But I should break apart a long single word, not multiple words :) Any suggestions?

2017년 8월 8일 (화) 오후 7:12, danfickle notifications@github.com님이 작성:

Hi @wonder13662 https://github.com/wonder13662 Could you try instead: word-wrap: break-word;

I think this is non standard.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/danfickle/openhtmltopdf/issues/113#issuecomment-320913273, or mute the thread https://github.com/notifications/unsubscribe-auth/APCWQMQ5aehqs7nBy6inodOqAQdXlvY5ks5sWDR5gaJpZM4OwQ_b .

danfickle commented 7 years ago

It sounds like you need the correct behaviour of overflow-wrap. Unfortunately, we don't support it and its a tricky place to change code as its part of the fundamental line breaking algorithm.

Correction: We do support the word-wrap property which is just an alias of overflow-wrap. However, we do not support the word-break property.

wonder13662 commented 7 years ago

Thanks. Now I've got clear what I can do or not. I should change my product feature capabilities :) Really appreciate great support!

Hope you have a fantastic day!

2017년 8월 8일 (화) 오후 7:48, danfickle notifications@github.com님이 작성:

It sounds like you need the correct behaviour of overflow-wrap https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-wrap. Unfortunately, we don't support it and its a tricky place to change code as its part of the fundamental line breaking algorithm.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/danfickle/openhtmltopdf/issues/113#issuecomment-320920322, or mute the thread https://github.com/notifications/unsubscribe-auth/APCWQBMjx3su_c-QeMDh1XidYPoM1cK4ks5sWDz-gaJpZM4OwQ_b .