Firefox opens a PDF file in a tab only if the server sends this file as application/pdf. Any other type or a generic type will Firefox show the download (open with) You can use the HTML download attribute to specify that the target will be downloaded when a user There are no restrictions on allowed values, and the browser will automatically detect the correct file extension and add it to the file (.img, .pdf, .txt, .html, etc.) 14 May 2019 The desired behavior is that the image should be downloaded not displayed. Here is the updated HTML anchor element for downloading the PDF Set the src attribute of the image to be the resulting data URL // obtained Use this to embed your PDF file without save and print options [code]