Skip to main content
Known Participant
August 8, 2026
Question

Richtext componet export in PDF formate

  • August 8, 2026
  • 2 replies
  • 21 views

Please advise , how do we export a Rich text Components in to PDF formate 

I am using Docx From Dynamic Template and Pdf from Doc options , using this I can able to print it in  PDF Formate however rich text components it is not supporting i tried to use the text options that too not displaying the information in text , part of the text going outside the document itself , Please advise 

2 replies

stefanhelzle0001
Brainy
August 8, 2026

We always try to go the HTML to PDF route as documented here:

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

If you want to stay with DOCX, you will have to replace the HTML formatting with the respective DOCX XML tags.

kapils024874
Inspiring
August 8, 2026

I can think of two possible solutions for your approach 

1. The Real Fix: Export Rich Text to PDF via HTML

To retain formatting like bolding, colors, and tables, you must bypass Word templates entirely.

  •     Use the Plugin: Install and use the HTML-To-PDF smart service.
  •     Map to HTML: Do not pass a!richTextItem(). Write an expression that translates your data into standard HTML tags (e.g., <b>, <p>).
  •     Format with CSS: Use CSS to define your page layouts and margins.
  •     Generate: Pass the combined HTML string directly into the smart service.

2. The Band-Aid: Fix Plain-Text Overflow

If you abandon rich text and stick with the Word template, you must constrain the text string in the document itself.

  •     Open your base .docx template.
  •     Place your substitution key (e.g., ###myText###) inside a single-cell Word table.
  •     In Table Properties, uncheck "Automatically resize to fit contents" and enable "Wrap Text".

You can also follow this tutorial Generate PDF from HTML