How to integrate LibreOffice in own application?

I want to add LibreOffice in my own application like below to write a letter and print it/save in local directory.

How should i do it? could someone please help me with the steps i need to follow or suggest me a tutorial? please help me