<embed src="http://www.star.le.ac.uk/~slc25/curry.pdf" type="application/pdf" /> <iframe src="http://docs.google.com/gview?url=https://d9db56472fd41226d193-1e5e0d4b7948acaf6080b0dce0b35ed5.ssl.cf1.rackcdn.com/spectools/docs/wd-spectools-word-sample-04.doc&embedded=true"></iframe>
embeds a PDF document and an MS Word document into an HTML web page.
However, for MS Word, it is reliant on Google, which has a habit of offering neat stuff and then withdrawing it, just as people become reliant on it; so I would like something which I have control over - a JS library from my server.
Alas, it says "Because of the way your browser protects itself against security risks (which is a very good thing) ViewerJS only works on documents that reside on your own server".
I understand that the are trying to prevent Cross Site Scripting attacks, but I have a requirement to embed documents from a different site (which is also under my control).
Does anyone know of a gratis JS library which will allow me to embed MS Word & PDF documents into a web page when those documents come from a different domain from the web page?
[Update] Maybe I just explained it badly.
Site A hosts the docs, which should be embedded in a page on site B.
I control site A and I also provide the code for the single page of site B which should display the embedded document.
Site B's owner will load that page to their site once, after I have coded it, but will make no other changes to site B. The end user gets a URL by email, with a link to the page on site B with some parameters to indicate what should be embedded
[Update++] This Plunk does it, but uses Google Docs, and I would rather not rely on any code from a 3rd party site (I don't mind 3rd party code; I just want it on my site)
No one? Not even for a bonus? I would be happy to award more points for a good answer. Lots more points