Did you take a look at my WordTemplate Demo Project? It can ingest a Word file, manipulate it with Mendix objects, even added charts and also export it to PDF; hence facilitates the same interface you are building. It isn’t perfect in transforming docx to pdf, but it caters for most simple scenarios with text, styling, images and tables. I mainly use opensagres itext to transform from docx to pdf.
Out of curiosity; why are you building this yourself circumventing the Mendix document templates?