Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to download PDF that requires a button click to print #3083

Answered by mdmintz
misterpeople asked this question in Q&A
Discussion options

Hey, on the website i scrape, I have a button that opens the PDF viewer in Chrome when clicked, there a workaround to do this without opening the viewer or something specially without automating the Chrome Viewer?
Also is i possible to change the file name before saving it? thanks!

print2
You must be logged in to vote

Set external_pdf to True:

external_pdf=None, # Set Chrome "plugins.always_open_pdf_externally":True.

Replies: 1 comment 6 replies

Comment options

Set external_pdf to True:

external_pdf=None, # Set Chrome "plugins.always_open_pdf_externally":True.
You must be logged in to vote
6 replies
Comment options

None is the default value.
You have to set it to True.

Comment options

I did, it still did not help it simply opens the chrome print view. Maybe its because im on Windows?
with SB(uc=True, proxy=proxy_url, incognito=True, external_pdf=True) as sb:

Comment options

You have to click on the file link directly to download it automatically when using external_pdf=True. If that isn’t working, then not sure.

Comment options

I click on the "print" button when external_pdf=True and the normal chrome print webview is showing, nothing else is happening, I guess its again bug with windows

Comment options

Hi,
The problem doesn't seem to be related to Windows.
I am using with SB(external_pdf=True, uc=True, locale_code="en", headed=True) as sb: on Linux and pdf are still displayed in the internal pdf viewer by Chrome.

Answer selected by mdmintz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /