-
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
Is it possible to cut cell content based on cell width #264
Comments
I do not think that hyphenation is supported in pdfmake. It would wrap if On 17 April 2015 at 12:18, Bojan Mihelac notifications@github.com wrote:
|
@Wabbala I do not want to hyphenate word, I want to cut excessive text that does not fit specified width of cell. |
That's currently not supported in pdfmake. Happy to accept a pull request. Let me know when you need help for it.
|
Ok thanks for answer, I will try to make PR for this. Looking at pdfkit documentation under Text styling there are two options that should be of interest for implementing this option:
I guess we should add width and height options to styling. Am I on the right path? |
No, we're not using the pdfkit Have a look at https://github.com/bpampuch/pdfmake/blob/master/src/layoutBuilder.js and https://github.com/bpampuch/pdfmake/blob/master/src/tableProcessor.js. Detect, when a line will be to long (you can before you are in the printer) and react to it. |
Pull request allows setting of This is not exactly what I was asking for but still can be usable. Example input:
Result: |
…ght as well as width (bpampuch#264, bpampuch#204, bpampuch#561, bpampuch#511, bpampuch#505, bpampuch#391). Conflicts: build/pdfmake.js build/pdfmake.min.js build/pdfmake.min.js.map src/documentContext.js src/layoutBuilder.js src/pageElementWriter.js src/printer.js
…ght as well as width (bpampuch#264, bpampuch#204, bpampuch#561, bpampuch#511, bpampuch#505, bpampuch#391). Conflicts: build/pdfmake.js build/pdfmake.min.js build/pdfmake.min.js.map src/documentContext.js src/layoutBuilder.js src/pageElementWriter.js src/printer.js
Here's my solution at #1733 for this that doesn't use the |
Currently pdfmake wrap content if it does not fit in given cell and if text cannot be wrapped it is diplay and overflows outside of bounds.
Is it possible to hide overflow content?
Example:
Result:
Wished:
This is not same as #204 as I would like etxt not to be wrapped but cut.
The text was updated successfully, but these errors were encountered: