Professional Documents
Culture Documents
Home
How do you download a PDF from Viewer.js? Ask Question
Questions Asked 6 years, 8 months ago Modified 2 years, 8 months ago Viewed 112k times
Tags
I was on a site with a PDF without a download option. I read online that you should "inspect
The Overflow Blog
element" to find the true source. After scrolling through the elements > properties I found a
Users
19 "Base URI" (I don't fully understand this) Defining socially responsible AI: How we
Companies select partners
From here the PDF loaded but there still wasn't a print /save button. If I use Chrome's Print >
Unanswered It’s RAG time for LLMs that need a source
Save as PDF it only saves a few of the pages. From what I can tell by playing around with it is of truth
that it only loads certain pages and only for a while. After that the pages go back to being blank
TEAMS
again until you scroll to them. I tried scrolling through the whole document and then print > Featured on Meta
Stack Overflow for save PDF but it only showed the bottom pages and the top ones went blank again. Anyone know
Teams – Start how to get the whole document in PDF? Changing how community leadership
collaborating and works on Stack Exchange: a proposal
sharing organizational and...
knowledge. google-chrome pdf javascript
Our partnership with Google and
commitment to socially responsible AI
Share Improve this question Follow edited Jun 29, 2021 at 10:23 asked Jun 17, 2017 at 19:45
bad_coder Pulse Linked
643 1 7 16 311 2 3 7
0 Download a pdf rendered by pdf.js
Why Teams?
1 Do you own the rights to download it? – Xavierjazz Jun 17, 2017 at 20:13 Related
1 Yes I do. My goal is mainly offline viewing. I like WiFi off when I read to stop notifications etc. – Pulse Jun
0 PDF form (not) saving
17, 2017 at 20:31
8
How to fix missing equations in Word 2007
Add a comment when printing/converting to PDF?
Hope am not too late in answering your question. Here are the steps: 1 Invert specific pages of a PDF
1. Open the particular pdf in the reader to full screen. 0 Can't view PDF in Chrome (using Acrobat
11 Reader) unless I select "Inspect element"
2. Launch inspect.
0 How can I print the entire webpage of this
3. Look for a hidden download button with id download styled as display: none , Change that url into a pdf file?
to display: inline to make it visible.
Hot Network Questions
4. Click the button to download your pdf.
Who was Bilbo's / Frodo's mithril chain mail made
Share Improve this answer Follow edited Mar 12, 2019 at 17:34 answered Oct 10, 2018 at 22:58 for?
Matt C Vincent Omondi How can I union two lists in the given way?
103 2 111 1 4
Closed form for infinite sum involving Chebyshev
polynomials
19 Alternative method: open the inspector and simply trigger the download button from the console: Story ID - In a World Where Artifacts Grant
document.getElementById('download').click() – Matt C Mar 12, 2019 at 16:27 Superpowers, a Poor Boy Finds a Unique Artifact
@MattC that should be an answer by itself :) – user1914292 Dec 4, 2019 at 12:53 EdgeLabels and EdgeLabelStyle of Graph
@MattC How exactly do I enter that command? – GJC Mar 25, 2021 at 20:59 How to calculate advantage/disadvantage with
multiple dice (e.g. 3d6, 2d10, etc.)
2 In the Chrome devtools ( F12 ), there is a tab called "Network" at the top. In it, all network requests are Question feed
shown; reload the page to get everything from a normal page load. There will be a long list of network
requests, and the raw PDF in this case has a URI starting with get.php and shows up under category
XHR – ethanwu10 Jun 17, 2017 at 23:12
3 In some readers, the F12 command will be disabled, so you will have to go to Google Controls > More tools
> Developer tools to access it. Then go to the Network tab and reload the page. All files will appear in the
list. You can sort by size, and usually the largest one is the PDF. As ethanwu10 mentioned, the type will
probably be listed as XHR. If you preview that file, and then right-click on the preview and selected "Open in
new tab" the PDF file will often open up or be downloaded immediately. – Doug Jan 23, 2018 at 14:15
1 @Doug I see no such get.php. Any picture of what it really looks like? – GJC Mar 25, 2021 at 20:59
Add a comment
document.getElementById('download').click()
6
Answer by Matt C and Vincent Omondi
Add a comment
Highly active question. Earn 10 reputation (not counting the association bonus) in order to answer this question.
The reputation requirement helps protect this question from spam and non-answer activity.
Not the answer you're looking for? Browse other questions tagged google-chrome pdf javascript .
SUPER USER COMPANY STACK EXCHANGE NETWORK Blog Facebook Twitter LinkedIn Instagram