Site iconJava PDF Blog

How to handle unsupported Image, Video and Audio formats in your web applications

Unsupported formats

Unsupported formats can be tricky to navigate. In this article we are going to talk you through different options on how you can work with these formats.

Unsupported formats

Images, video and audio are pretty straight forward. You just need to convert them to a supported format, for example Heic to PNG.

However Office and PDF are more complex as they have multi-page layouts. But must documents can be converted into a PDF (fun fact over 70% of the Worlds documents are in PDF format). So, if you can do it in PDF you can do anything.

3 solutions for unsupported formats

We have 3 solutions for those unsupported formats:

  1. System defaults
  2. Plug-in/viewer
  3. Convert to a supported format

It is also worth noting that there are a lot of Open Source and Commercial solutions available.

System defaults 

System defaults are fine if you just want to give access to a document, as that is pretty much all it allows you to do. However, this will vary depending on the file type/system and browser that you are using so it can be very unpredictable. Safari, FireFox and Chrome actually have built-in PDF viewers – although they look different on each browser type.

Viewer/Plugin

A viewer/Plugin allows you to upload the file client side and then converts dynamically. The whole file has to be uploaded and this can mean you encounter some speed and security issues. It is much faster to change the page or scale. However, if the license is to view you will need it all the time, it is much better to convert so that the files are yours forever. This means if you stop adding new files you can stop your convert license.

Converter 

Conversion can be done server side and is usually one-time. You only upload the display content but you will need time to load each page. It will generate HTML which can then be processed and gives better integration into HTML5 pages.

Office Files

This is a huge topic but luckily we have a blog article all about it which you can find here: https://blog.idrsolutions.com/how-to-convert-office-documents-to-pdf-with-microsoft-graph.

If you are still unsure or want some other suggestions, please post your requirements below and we will be happy to help…