Mark Stephens Mark has been working with Java and PDF since 1999 and is a big NetBeans fan. He enjoys speaking at conferences. He has an MA in Medieval History and a passion for reading.

PDF to HTML5 conversion – video

25 sec read

The PDF file format allows you to embed video directly inside a PDF file. So, I wondered, how easy would it be to write it out to HTML5. The data is embedded as a binary bytestream in one of several formats (mp4, swf). It turns out that HTML5 also supports these formats and it has a special tag (video) for the purpose. So it is actually reasonably straight-forward to extract it from the PDF and make it available in HTML.

Here is my first attempt as an example for our PDF to HTML5 convertor (and it works on IPad as well!). What do you think?

Click here to see all the other articles in the PDF to HTML5 conversion series.



Our software libraries allow you to

Convert PDF files to HTML
Use PDF Forms in a web browser
Convert PDF Documents to an image
Work with PDF Documents in Java
Read and write HEIC and other Image formats in Java
Mark Stephens Mark has been working with Java and PDF since 1999 and is a big NetBeans fan. He enjoys speaking at conferences. He has an MA in Medieval History and a passion for reading.

3 Replies to “PDF to HTML5 conversion – video”

  1. I looked at the exported code, and unfortumately it doesn’t look like the converter is compensating for browser type. I am using FireFox, and .mp4 files will not play, as FireFox only implements OGG (http://en.wikipedia.org/wiki/Theora). You converter needs to have a format converter to export an OGG when its not available, and an mp4 when it’s not available. There also doesn’t appear to be a flash fallback.

    Best of luck!

Comments are closed.