AFAIK there is no module available from the marketplace that will provide this function, but PDFTron (see: https://www.pdftron.com/documentation/samples/java/OfficeToPDFTest) seems to have a java sdk that can provide this functionality. They have a solution on Mendix as well (pdf viewer and editor).
With the SDK and some java code you should be able to create a function that will allow you to implement the features you are asking for. It is a licensed sdk though and there might be other solutions if you Google for this.