1

I need to open a RTF File in C# and read the content inside that file.

I have used Microsoft.interop.word.dll to open RTF File but in Azure environment it is not supported.

Is there is any other SDK or dll I could use to open RTF Files on Azure FunctionApp?

I have tried with OpenXML SDK but it cannot able to open RTF Files.

Does anybody know how I can solve this problem?

Piotr Kula
  • 9,597
  • 8
  • 59
  • 85
Sivabalakrishnan
  • 475
  • 1
  • 7
  • 23
  • Aren't Azure Functions meant to be short, quick, simple actions that basically give some information to another (possibly heavyweight) process? If so, why are you trying to open an RTF, which is potentially a large file? Your problem feels like it should be a Queue/QueueProcessor kind of solution, which means you CAN use those heavyweight libraries. – Neil Sep 24 '18 at 08:56
  • I kind of agree with with Neil.. but maybe the issue can be solved by having the RTF data extracted and saved somewhere before the function app... Unless this is the function you are trying to achieve. Unfortunately it is extremley difficult working with document files... which is frustrating. Unfortunately there are severals versions of RTF so a pure code solution may not work either. One other crappy solution could be this. https://stackoverflow.com/questions/5634525/how-to-convert-an-rtf-string-to-text-in-c-sharp – Piotr Kula Sep 24 '18 at 08:59
  • Have you tried the WPF TextRange, to see if you can just use the objects, not the UI - https://stackoverflow.com/questions/2294667/how-to-read-an-rtf-file-using-net-4-0. Not idea and a bit hacky. – Murray Foxcroft Sep 24 '18 at 09:05

0 Answers0