Skip to main content
Nintex Community Menu Bar

I’m confused about how to render rich text into a PDF document created by the Generate document action in a workflow. Apparently some kind of feature was added in May 2024 (as stated here), but it seems that is only when you are getting your text from somewhere besides the workflow (?) and using Nintex DocGen (what is that?).

All I want to do is take some rich text entered in a form during my workflow and have it render properly in a PDF document (generated from a Word template). I don’t want to write it to a SharePoint list first and then retrieve it, as seems to be one option, because my workflow deals with highly sensitive information and I don’t want it in SharePoint even with permission restrictions. I want to take it directly from the rich text entered on the form and write that text, with formatting intact, into my generated document. Is this still not possible?

Hi ​@DavidAD,

Thank you for your questions.
I’ll start with Nintex DocGen.  This is the engine that Nintex uses to create documents.

So, in Nintex Automation Cloud, you use the Generate Document action to create documents, but under the hood, it uses the Nintex DocGen engine. I just wanted to let you know that there is nothing you need to worry about.

Yes, you can take the rich text from the form and add it to a PDF.
Only the following rich text formats are supported, though, as per the help files:

  • Bold

  • Italic

  • Underlined

  • Hyperlink

  • Bulleted/numbered list

  • Left, Right, Center alignments

To use the generate document action, you need a template with tags so that Nintex knows where to place each form control, variable, image, etc.

This template does not need to contain sensitive information. It can be entirely made up of tags if you want, or have a simple title and some labels, etc., and tags where you want workflow outputs placed.

The template does not need to be in SharePoint; it can reside anywhere documents can be hosted, such as Box, Dropbox, OneDrive, etc. You import the template into your workflow, usually by using a get file action for one of these connectors, and then feed that into the document generation action.

I hope this helps clear up your need to create documents.
 


Thanks, ​@SimonMuntz!

Sorry, I must have created the impression that I don’t know much about document generation. In fact, I do; many of my workflows use it. But thanks for the explanation about DocGen; I was not aware of how it worked.

My question is specifically about how to render the rich text in my generated document. The forms in my workflow have several fields with rich text, but when that text is written to the document (the template is a Word doc), it simply writes the HTML tags instead of the rich text (and I am using only supported formats, i.e., bold, italics, and bulleted/numbered lists). Is there something “extra” I need to do to make the rich text appear in my document? If not, why is it rendering the HTML tags instead of the rich text formatting?


Hi David,

That sounds strange as you should be able to simply use any rich text field from a form and tag it in your document as per any other field.

 

Can you try also putting that rich text field into an email to see how it renders?  It should render with all the formatting and not show any HTML.

 

If that’s the case then I’d recommend logging a support call.


Thanks for clarifying, ​@Chris_Ben. The only thing I can think of is that what the workflow is writing to the document is actually workflow variables instead of the rich text fields themselves, and maybe that affects the outcome. My workflow is pretty complex, with several levels of review, and most of the reviewers need to be able to revise the content of the rich text fields. They also have the ability to send it back to the previous reviewer. And some levels of review may be skipped, depending on the circumstances. Therefore, I use workflow variables to capture the rich text values and set those as the default content of the fields for the next reviewer, to make sure the most recent version of the rich text fields is being passed forward.

Those workflow variables are successfully passing the rich text formatting to the next form, so I know they can handle the formatting. But maybe when it comes to writing those to a document, something is different (?). Anyway, I’ll try the email rendering as you suggest, and I’ll see what happens.


Hi David, I’ve tested your theory and you’re correct - text variables containing the RT formatting render differently to form variables.  I don’t suppose you have a final task form / review that you can refer to in your doc gen action instead of the variable?  Otherwise this would have to be a feature request that you can log on the ideas portal: https://ideas.nintex.com/

 

 


Thanks for checking into that! I’ll check to see if I can use the RTF from a final form.


Reply