Skip to main content
sayalic0004
May 12, 2026
Solved

PDF from html plugin - Overflow of the text in normal paragraph field

  • May 12, 2026
  • 3 replies
  • 0 views

I have a requirement where need to generate the PDF document. if i add text which is more that 4000k then text gets overflow the screen and it comes in single line. How to add a line break so that the text should be in paragraph itself.

    Best answer by gayathris111098

    Try adding word-wrap and white-space CSS to your paragraph
    html<p style="word-wrap: break-word; overflow-wrap: break-word; white-space: pre-wrap; width: 100%;">
    your long text here...
    </p>

    word-wrap: break-word — breaks long words/strings at the container boundary
    overflow-wrap: break-word — modern equivalent, use both for compatibility
    white-space: pre-wrap — preserves line breaks (\n) from your Appian text field and wraps normally

    3 replies

    stefanhelzle0001
    May 12, 2026

    Did you read my blog post on this topic?

    https://appian.rocks/2023/10/23/great-pdfs-with-appian/

    gayathris111098
    May 13, 2026

    Try adding word-wrap and white-space CSS to your paragraph
    html<p style="word-wrap: break-word; overflow-wrap: break-word; white-space: pre-wrap; width: 100%;">
    your long text here...
    </p>

    word-wrap: break-word — breaks long words/strings at the container boundary
    overflow-wrap: break-word — modern equivalent, use both for compatibility
    white-space: pre-wrap — preserves line breaks (\n) from your Appian text field and wraps normally

    shubhama926776
    May 13, 2026

    Use this CSS in the HTML before PDF generation: white-space: pre-wrap; overflow-wrap: break-word; word-wrap: break-word;

    If the text is inside a table, also set table-layout: fixed; width: 100%; and put the text in a <p> or <div>, not plain inline text.