Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Adding styled text to a .docx file with Apache POI

Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey all,

So I know that the Apache POI library has functions that let you modify the format of a segment of text you are inserting, but that doesn't quite help in my case.

Specifically, I have a string extracted from a TinyMCE textarea field. So basically, the String I want to insert into the Word document is something like:

And in the word document, I would like it to display 'test', as styled in that string.

Is there any way I can send in an actual string that includes the styling like this, instead of manually setting formats in the code? If not in Apache POI, is this possible with docx4j?

Thanks all!
author & internet detective
Posts: 39530
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think POI supports it.
He loves you so much! And I'm baking the cake! I'm going to put this tiny ad in the cake:
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!