You can try to create a Published REST service (GET method) that delivers the document like this:
Beware of the authentication for your documents, use secure tokens like in this example
The shortcut, although not very dynamic: Save your word document as html and copy-paste this into a Mendix html-widget. See what happens and take it from there.
Hey Vincent,
Im facing the same challenge: I want to preview a .docx file in Mendix. Can't find a solution.
What the status on this?
UPDATE: I've used the method of Pim to solve this matter.
Some considerations:
- Security. Documents are public. Also, to me it looks like MS Office Viewer stores a temporary copy of your document to get this working. This is a risk.
- Does not work with localhost. MS Office Viewer requires a valid domain and hosting.
- You might have to encode the src url so it can handle spaces and other symbols in filename.
Best,
Nick
still not working… any idea?
To give you more information, my application is a viewer of technical sheets stored in Teamcenter.
So there is a part which get the path of each file in Teamcenter file systems and store it in Mendix.
The other part should allow the user to view in the browser the selected Technical Sheet…
There are more than 10000 sheets in Teamcenter and the format can be doc, docx or pdf…
And I have to make it as easy as possible because it will be used in the factory and technician should click as little as possible...
So I need a way to display these file in my application.
thanks in advance
Hello all,
I did not found any solution. I don’t understand because the in the documentation of the document viewer there is this sentence:
1.2 Limitations
The widget tries to display a document inside a page. However, it may fail to do this, since browser settings determine whether a document can be opened inside a page. In such cases, a download pop-up window is opened. For example, Internet Explorer may succeed in opening a .doc file inside a page and fail in opening a .png image, while exactly the opposite may be true for FireFox.
I have tried in IE but still get the download popup that occurs instead of viewing my file...
I really need help with this!
thank you in advance