html2pdf.js icon indicating copy to clipboard operation
html2pdf.js copied to clipboard

text-overflow: ellipsis is not working

Open mmstewart opened this issue 5 years ago • 2 comments

Hi, I was wondering if there is a feature for html2pdf that I am not aware of, where you are able to use text-overflow: ellipsis (truncate the text) to display an ellipsis ('…')?

For example, I have tried using this CSS class selector for some fields to display an ellipsis ('…') when the text passes the max width, but nothing happened in the pdf.

.field .input .content {
  margin-left: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
}

I also added white-space: nowrap; in the same CSS class selector above, but nothing happened as well.

mmstewart avatar Jun 10 '21 13:06 mmstewart

What do you mean with "nothing happened in the pdf"

ezero0 avatar Sep 08 '22 17:09 ezero0

This is a problem from html2canvas.js I myself still have no idea how to solve this

Gazoon007 avatar Oct 16 '23 02:10 Gazoon007