I have recently created a simple website for a friends new restaurant. I have included a button which prompts a download of the restaurants menu in .pdf format.
This download works fine when tested on a laptop/desktop (windows), the menu is downloaded and can be opened with no problems. It also works on iPad, the menu opens up right away and can be viewed without problems.
The problem comes on mobile (Android). When you click the button the menu looks as though it is going to open but every time it fails and says:
Error: menuname.pdf cannot be opened as it is of wrong format.
I have tested it on a few different phone brands (LG, Sony) and get the same problem on each. I have looked around for an answer but there isn't much to go on.
Is there a different approach that needs to be considered for opening it on mobile? (As it works perfectly on laptop etc)
I have just used HTML to implement the download feature by adding the 'Download' element to the button / link.
<a href="resources/files/menuname.pdf" class="btn btn-empty" title="menuname" download="menuname.pdf" target="_blank">Download menu</a>
Any help would be greatly appreciated.