Chrome: how to open a local pdf on a specific page - google-chrome

For an online pdf I can simply add #page=10 after the url to open the pdf on the page 10.
But this doesn't work for local pdf. [2020 edit: this is now working for local pdf also cf. the selected answer]
Let's say I open this url file:///C:/Users/Me/Desktop/My%20Documents/textbook.pdf in chrome.
If I add #page=10 at the end of the link (the pdf has more than 50 pages), then chrome returns this error:
Your file was not found It may have been moved or deleted.
ERR_FILE_NOT_FOUNDthis url
Also Chrome change the url (cf My%2520Documents): file:///C:/Users/Me/Desktop/My%2520Documents/textbook.pdf%23page=10

For my Chrome(Version 83.0.4103.116 (Official Build) (64-bit))
It works with #page=number, if I open a new tab and paste the link:
file:///D:/test.pdf#page=5
Chrome will open the pdf at page 5.

Related

In VS code, whenever I save a file in Html its being saved as Brave Html document when I actually want it to save as Chrome Html doc. How to do it?

Earlier I used to have Brave as my default browser and installed vs code using Brave browser. I then uninstalled vs code and reinstalled it from chrome browser. Still I'm getting the same problem.
Right click then click open with and choose more apps and select chrome then select always open with chrome and tada.

Why does Google Chrome only displays the first page a pdf file?

I'm facing a problem with Google Chrome. One of my PDF only shows the first page and the rest looks as following:
Example:
First page is displayed normaly.
It recognizes the amount of pages in the PDF.
If I download the PDF, it is completely fine and useable, I even can open it in Chrome and it works fine. The problem doesn't occur on Firefox or Safari.
I'm using Google Chrome Version 85.0.4183.83 (Official Build) (64-bit)
Thanks for your help.
I experienced the same issue (but with another website). After investigation, it appears that this has something to do with SameSite cookies.
You can fix it by setting this flag to Disabled then restart Chrome:
chrome://flags/#same-site-by-default-cookies
Update: Found an issue in the Chromium bug tracker related to this problem:
https://bugs.chromium.org/p/chromium/issues/detail?id=961617
This issue appears to be caused by a conflict between Chrome and Fast Web View pdf optimisation. To fix it you need to turn off the optimisation within your pdf program settings and save the file again (in Adobe products this is located Preferences>Documents>Save Settings - uncheck Save As optimizes for Fast Web View). Pdf files which don't include this optimisation render all pages correctly.

Auto-open HTML file from Chrome to another browser

On downloading a file in Chrome, there does not seem to be a way to auto-open HTML files to a browser other than Chrome.
Opening the HTML file from the Downloads folder opens the file in the default browser, as intended. However, when Chrome auto-opens the downloaded file, it just opens in Chrome.
Why I'm asking: I built a Chrome extension that generates an HTML file based on user-selected text in a given webpage. The resulting HTML file, when opened, redirects to another website, to a page that is based on the user's selection. That page does not work properly in Chrome, and it won't for the next 6 months. In the meantime, I learned to program a Chrome extension and I have been blocked on this auto-open problem for 2 weeks.
On Windows 7 without admin privileges.

How to download a pdf file to local disk which opened in html5 pdf viewer

The PDF file forced to be opened in html5 which there is no print or download button. How could I save it to my local computer?
The viewer looks similar to this one https://mozilla.github.io/pdf.js/
Pdf.js documents can be downloaded by executing the following javascript from the browser search bar:
javascript:PDFViewerApplication.download()
Note that in order to execute javascript in the search, this feature must first be enabled:
In Safari, select "Allow Safari from Smart Search Field" in the Develop menu.
Chrome and FireFox users can follow these instructions to enable the feature.

validate pdf in Selenium using chrome browser

When I click on a link in a page, a PDF opens. I need to validate the contents of this PDF file using Selenium in C#.
I'm able to handle this in Firefox 25(using pdf.js). In firefox, the contents of this pdf are displayed in html and hence, using isTextPresent, I am able to validate if the pdf contents are correct.
But, though Chrome opens the pdf in my browser, it does not show the pdf contents as separate elements. Is there any plugin/ setting change that can be done for me to view the pdf as html in Chrome browsewr
PDF.js is also available for Chrome - see PDF Viewer in the Chrome Web Store.
I suggest to load the PDF using the following URL: chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/content/web/viewer.html?file=<URL-encoded version of PDF file's location>.
The reason for explicitly putting the URL as shown before is that if the PDF url is visited before the extension is loaded, then the default PDF behavior is triggered (in Chromium, the file is downloaded, in Chrome, it's displayed using Chrome's built-in PDF Viewer).
After the PDF.js is loaded, you can directly type the URL for a PDF file in the omnibox, the extension automatically detects PDF files and renders the result (based on MIME-type).