how to download pdf from pdf.js viewer

15,045

Solution 1

Are you in a web browser?

In this case you can simply save the page (ctrl + s), and you'll have the pdf.

Solution 2

I'm not sure why you are trying to download the PDF via the browser inspector.

When I open a PDF in the browser I get a toolbar with a download button at the top on the right of the screen.

enter image description here

Share:
15,045

Related videos on Youtube

Ravi
Author by

Ravi

Updated on September 18, 2022

Comments

  • Ravi
    Ravi over 1 year

    I want to download a pdf file from pdf.js viewer but i am not able to download the file.

    I also tried to download using this way:

    1. Open the particular pdf in the reader to full screen.
    2. Launch inspect.
    3. Look for a hidden download button with id download styled as display: none,
    4. Change that to display: inline to make it visible.
    5. Click the button to download your pdf.

    But still I am not able to download the file.

  • pittix
    pittix about 5 years
    I have the error in JSON {"data":null,"success":false,"message":"Token missing"}. Maybe the link is missing a temporary token Anyway, that's a MS Office file, so you should save it and then convert to pdf on your PC