Once upon a time there was something about putting a pdf on a page in book. I don't think I ever got it to work and now I don't see a way to do it. I have a bunch of pdf's I'd like a way to display them without forcing download in a book resource rather than copy/pasting the content, fighting moodle tables, etc. Is there any way to do this?
There are two approaches to include a PDF in your Moodle book resource.
1) You can use a library like https://github.com/mozilla/pdf.js/ to display a PDF. However, this might need some preparations and a bit of coding.
2) You could try to open the PDF in Word and then use the https://moodle.org/plugins/booktool_wordimport plugin to import it into a book. However, this will only work for PDFs with simple layouts.
1) You can use a library like https://github.com/mozilla/pdf.js/ to display a PDF. However, this might need some preparations and a bit of coding.
2) You could try to open the PDF in Word and then use the https://moodle.org/plugins/booktool_wordimport plugin to import it into a book. However, this will only work for PDFs with simple layouts.
Arguably the best way, by far, to insert a PDF into a Moodle activity is to use the "Adobe PDF Embed API".
The documentation is easy to understand. Take five minutes to read it, or maybe ten, say 15 minutes, and you'll never need anything else.
General information: https://dynamiccourseware.org/course/view.php?id=77§ion=77➚
Example of a book containing a PDF: https://dynamiccourseware.org/course/view.php?id=148§ion=1➚