how to open pdf file in jupyter file browser? - pdf

I would like to open a pdf file using the jupyter notebook's file browser. However, when I click, it always opens a new tab and shows a dark screen.

I spent a couple of minutes looking for a workaround for this and found a github issue in the jupyter project where OP discovered that the issue is resolved by installing the PDF viewer plugin to Chrome
I just installed it and I am now seeing PDF's from my notebook in Chrome.

If you want to open a pdf file using the jupyter filebrowser, you need to use Firefox - Google Chrome blocks it.
Alternatively, to open the pdf inside a jupyter notebook cell, you can use IFrame - but again, it doesn't work for Chrome.
from IPython.display import IFrame, display
#filepath = "http://wikipedia.org" # works with websites too!
filepath = "file.pdf"
IFrame(filepath, width=700, height=400)

Related

Edge Browser: Link From PDF Not Opening a New PDF File

I installed an adobe acrobat extension in Edge browser. My link is relative path. I set up all these options with this extension:
In my PDF file, the embed link is a button.
After the click, it did not open a PDF file in Edge, but works fine in Chrome and Opera. What do I do to make it work in Edge?
(UPDATE)
This is how Opera and Google Chrome show my URL after I click a button in the PDF, which opens a PDF file.
//example.azurewebsites.net/CANGC/Process/off-site-facility-management/6_1-Chemistry/Step-Descriptions/6-1-1/6-1-1-1.pdf
This is how Edge shows the URL after the click, which cannot locate the file.
//example.azurewebsites.net/CANGC/Process/off-site-facility-management/6_1-Chemistry/Flow-Chart/6.1%20Ultrasonic%20Chemistry%20Management/2.%20Process%20Design/2b.%20Step%20Descriptions/1%20-%20Chemical%20Inventory/6-1-1-1.pdf
Edge rewrote the URL longer, forcing the path wrong.
What's funny is that I put the same URL into the Edge Browser, which opens that PDF file. The extensions do not solve my problem. Is there another solution out there?

Selenium: How can I get the link for downloads that started automatically?

I am using selenium to automate some downloading tasks, but some pages start the downloads automatically and I need to know the links of those downloads during or after the download and the link is not available in the page.
How can I get the URL of the files that started downloading automatically?
If you are using Chrome to run your selenium scripts you can just navigate to the chrome://downloads/ and get the latest download file's URL.
Or you can fire a Ctrl+J keyboard action to the browser using java robot classes and open the tab.
(Chrome downloads page is a html page and you can capture elements in it)

file name grayed out in browse window when try to upload video file to my website in mac safari

when user click on browse bottom and try to upload video file to the site (MP4 for example) from mac safari the file grayed out (disabled) and it can't be selected.
it happens only for video files and only in mac Safari.
in others browsers in work good.
when I try to upload MP3 file it also work.
I experience this "bug" on a daily basis with Safari. The bug has not been patched or fixed and still exists today with Safari 13.0.2 and macOS Catalina.
The workaround is this. When the file selection window opens, control-click on the file and select Quick View from the menu. Then go back to the file selection window and you will be able to click on it for upload. Ridiculous that this hasn't been fixed by Apple.
select the file (either jpeg or png) and rename to filename.jpeg><filename.png> so the file type remain same.
worked for me.
Upgrade safari to the latest version since this was a bug that mac had which they patched in the most recent version since others had the problem too.

PhoneGap InAppBrowser not loading pdf

I am using PhoneGap InAppBrowser to load pdf in my app. It is loading pdf in IOS, but there is no location bar shown, and on Android pdf is never loaded.
Here is my code to load pdf
iabRef = window.open('sample.pdf', '_blank', 'location=yes');
Not sure if this counts as an answer, but I believe this is a known bug. It is marked as fixed in the 2.4.0 RC here.
Ran into the same with 2.4.0. I switched to using the _system browser in my open call. It's not ideal, as it opens a browser that simply downloads the file, but at least it works.

Safari Extension And Download Links

I'm working on a safari extension. I've included a start script in it, but it is not working with download link. for instance if I navigate to www.example.com/example.zip script is not getting called. I was wondering if it is possible to get it to work with download links?