0

I have some document templates(.dotx files) with placeholders. I need to read that template and replace placeholders with actual text which is coming from database columns. I am able to do this using docx4j's WordprocessingMLPackage, but problem is, in some of database columns there is HTML code. This is text coming from a rich text editor fields. When I tried to replace this text in word document template, I am getting pure html code is copied into document. I want convert that html code into actual html text and write into document. How am I able to achieve this?

Sandeep Reddy K.
  • 1,001
  • 4
  • 16
  • 30

1 Answers1

0

You can use https://github.com/plutext/docx4j-ImportXHTML either directly, or via content control databinding OpenDoPE extensions.

JasonPlutext
  • 15,352
  • 4
  • 44
  • 84