Moodle Embed PDF's

dgcruzing's picture

I did have a quick search and not sure if this has been requested as yet. 

Would love to be able to use the Moodle Embedded PDF commands within a string of pages in something like the Course presentation H5P module. 

Here is our conversation on the coding that works within Moodle.

Embedding PDFs in book module?

https://moodle.org/mod/forum/discuss.php?d=318224&parent=1383547

Now taking this one step further, At the moment I am able to have a string of video's, Say up to 10 using "Course presentation H5P module"

That I have adapted to suit, so with this I can bring together Video's with Q&A, Pictures with Q&A. 

I would love to be able to have the same for a grouping of PDF's that are of the same theme. 

Would the "Iframe Embedder" work?

 

 

1
0
Supporter votes Members of the Supporter Network can vote for feature requests. When the supporter network has generated sufficient funding for the top voted feature request it will normally be implemented and released. More about the H5P Supporter Network
tomaj's picture

I think the optimal solution would be that someone, creates a PDF-viewer content type. It can probably be super light weight, and just wrap a library like this.

I don't know if the iframe embedder approach would work. Let us know if you try it.

- Tom

mrpottz's picture

To save some time, just convert your file to PDF and use the IFrame embedder  feature.  It works well within the H5P Column tool.  I have not tried it elswhere yet.

Joining the converstaion, I was trying to embed a PDF file with the Iframe embedder within column, but had no success. I either got a "refused to connect" error, or "took too long to respond". I'm not sure what I'm doing wrong. I was trying to link to a pdf from my google drive, and later to a random PDF hosted online somewhere. Can anyone assist?

I'm working on Moodle.

Thanks,

Uriya

BV52's picture

Hi Uriya,

The core team does not recommend using Iframe embedder anymore. There are plans of removing it altogether. The reason is that it is unresponsive and does not accessibility features. 

-BV

Aright, thank you for the update. 

Is there any other way to embed or display a PDF file in H5P? 

BV52's picture

Hi uriyam,

I'm afraid not as of the moment. Maybe you can convert it to an image file or take a screenshot?

-BV

Maybe as a specific solution, but I'm looking for something more scalable :)

Thank you!

erodal1978's picture

I think there's no way to do this, the other day I had to convert many pdf files one by one and add them as images on H5P

I have made a python code, which can convert the pdf (with all slides) into a h5p content.

Just download the code and pleace your pdf on the directory and run the script, which should produce your h5p content. 

https://github.com/thivinanandh/pdf_to_h5p_converter

Please let  me know if you need any additional information

otacke's picture

Hi!

Good job. Your code does not generate a UUID for a subcontent id, so xAPI statements that are sent by content that was generated with your converter may be rejected by Learning Record Stores or cause other rejection issues at some point, please see https://github.com/thivinanandh/pdf_to_h5p_converter/issues/1.

Best,

Oliver