0

I am using JODConverter in my java application to convert from RTF to HTML using libre office. It works great but I need the encoding type to be ISO-8859-1. I set this in libre office but when I do the conversion it does it as UTF-8 which sometimes causing some problems when I put the html in a DB. When I open the file in libre office and save it then it converts it to ISO-8859-1 and I have problems putting it in the DB. Is there any way to change this that I do not have to manually do it?

Shea
  • 23
  • 1
  • 8
  • What do you mean by `I set this in libre office` ? I you mean that you changed something in the LibreOffice Options menu, then JODConverter won't apply this change since a new user profile is created from scratch when LO is started by JODConverter. But you can tell JODConverter to use a specific user profile with the `templateProfileDir` option. – sbraconnier Jun 08 '18 at 13:24
  • In libre office I set it to always handle html as ISO-8859-1. When i do a conversion it set it as UTF-8. If I open the file in libre office and save it then it converts it to ISO-8859-1 and the DB accepts it no problem. So i need a way to either tell libre office or jodconverter to always use ISO-8859-1 instead of UTF-8 – Shea Jun 08 '18 at 17:41
  • Have you tried using the [templateProfileDir](https://github.com/sbraconnier/jodconverter/wiki/Configuration#file_foldertemplateprofiledir) option ? – sbraconnier Jun 10 '18 at 03:11

0 Answers0