-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hyphenating text #1511
Comments
Issue #264 is about hiding text without breaking. Now is supported by issue #204 "hard-wrapping" text words (if is word too long is breaked after max size) here: Lines 678 to 696 in c2cdd46
Text hyphenating according to some algorithm is too complicated to implementation. I do not know how it could be solved now. |
How about offering a callback function like a suggested, so users can implement it themselves? If the callback function is undefined, the library would just fall back to the default behavior that is there now. |
One nice way could be the support of softhyphens (html symbol, utf8 U+00AD). This way the dev can supply pre tagged text to pdfmake and pdfmake does not need to rely on anything. If no soft hyphen is supplied, nothing changes. |
any progress on this? |
Hello,
A client asks me for hyphenating text in the pdf output. Looking at #264 it is currently not possible. I am thinking about implementing this if it is possible in a reasonable timeframe and you're happy to accept a pull request. My goal would be to offer a callback
hyphenateWord(word)
that the user can override with whatever functionality the user pleases. I do not want to add new dependencies or locale features to pdfmake.I think my new code should be executed somewhere here:
pdfmake/src/layoutBuilder.js
Line 679 in c2cdd46
Am I on the right path?
The text was updated successfully, but these errors were encountered: