Activity
Newest
Oldest
Yerikyy
Any Updates?
Nicolas Giard
Yerikyy: This is planned for v3. See https://blog.js.wiki/ for updates.
Yerikyy
Nicolas Giard: Ok, thanks. I've also got a solution for v2. after doing some research which embed Adobe official pdf-embed-api.
See
https://developer.adobe.com/document-services/docs/overview/pdf-embed-api/ for more detail.
Works for me on both HTML and MD editors.
Please note, if there are lots of pictures or video(or large) on page, the DOM is loaded too late, that the addEvenListener function could not find specific DOM. So anyone use this method needs to use window.load function to rewrite Adobe demo code for sure.
Nicolas Giard
planned
Nicolas Giard
D
Daniel Hollweg
yeah would be great and please a pdf export as remarked before ;-)
Jon
Would this be different than an iframe?
I have PDFs embedded on our wiki using an iframe pointing to the PDF asset.
Joel Roberts
Jon: How did you pull this off? I've been working at this this morning and can't seem to get to work
Bruno Larochelle
Joel Roberts: Greetings.
I don't know if you are still trying to do this, this might help if you have not succeeded yet:
- Use the <html> editor, not the visual editor. Maybe Markdown would work also, I did not try.
- Insert an <iframe>, with a link to an internal WikiJS pdf asset. You must upload your PDF to the assets of WikiJS—maybe that is the part that you missed from Jon's post.... the PDF asset.
- Turn off the Admin > Security > Block iFrame Embedding switch.
Here is an edited example of my <html>:
<p>This is a to use an iFrame to display an WikiJS internal (asset) PDF</p>
<div>
<iframe src="https://blah.blah.your.assets.path/whatever.pdf" width=100% height="600"></iframe>
</div>
Note, however, for me, that this only works with PDFs that are uploaded to the Wiki as assets. It does not work for links to other PDFs (on another site). At least not the ones I tried.
I'm quite happy to find out this works, as now my PDFs are embedded onto the Wiki page.
Yerikyy
Bruno Larochelle: Not work as expected. The pdf file is downloaded automatically in both Chrome and Edge
Bruno Larochelle
Yerikyy: Hi Yerikyy.
Are you sure you are using links to a PDF that was uploaded to WikiJS assets?
I am using WikiJS 2.5.201 and the PDF shows in the embedded iframe, in both Chrome and Edge.
Yerikyy
Bruno Larochelle: Hi, Bruno. Yes, I copy&paste your demo code, and changed the src to my asset link. After finishing editing and exit editor, the pdf file is downloaded automatically. I am using Wiki.js 2.5.268.
I found a new and excellent method to embed pdf with Adobe official api.
See my reply to Nicolas Giard up this page.