You are on page 1of 2

Search on Super User… Log in Sign up

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

Create a free Team

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?

How can I export a generic page range to


3 Answers Sorted by: Highest score (default) 5
PDF using Microsoft Office *without* a PDF
printer?

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.)

Add a comment Hilbert's sixth problem and QFT description

Why do most US regional


colleges/universities/institutions have poor
By opening the network monitor in your browser's devtools, you can view all network requests the reputations in academic circles?
page makes; somewhere in there should be the PDF, though the URL / URI might not look like
Pleasant Cuboids
6 one.
Smart trainer getting extremely hot during
workouts
On the specific link you provided, the page made a request to get.php with a query string hash of
the document - the response was a plain PDF file. Are all actually equal?

How to effectively guess the initial values for a


Poincaré section?
Share Improve this answer Follow answered Jun 17, 2017 at 20:24
ethanwu10 Circuit Simulator
1,119 1 6 20
What are difficulties linguists have run into with
common fonts?

Is this a finite set for which it is impossible to list its


elements?

Why are IAU constellation boundaries not


rectilinear?

How can I create a table like this

Is it reasonable for a city to be almost completely


wiped out after two weeks?

Eulerwalk around Forest tree

Has anyone ever obtained a P-Channel Depletion


mode power mosfet?

Difference Between Particle Velocity and Wave


Velocity in a Longitudinal Wave
Could Apollo have survived the lander toppling
1 Thank you for your response. Can you please elaborate on the steps from the link I provided to get the plain over?
Log in Sign up
more hot questions
PDF? I'm not sure exactly how to get there. – Pulse Jun 17, 2017 at 20:29

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

Share Improve this answer Follow answered Apr 3, 2020 at 7:01


Bijan
179 1 3

Add a comment

You must log in to answer this question.

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

Tour Stack Overflow Technology


Help Teams Culture & recreation
Chat Advertising Life & arts
Contact Collectives Science
Feedback Talent Professional
About Business
Press
API
Legal
Data
Privacy Policy
Terms of Service
Cookie Settings
Site design / logo © 2024 Stack Exchange Inc; user contributions licensed
Cookie Policy under CC BY-SA. rev 2024.3.1.5619

You might also like