Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not open local files in pd.js chrome extension #6339

Open
skyhirider opened this issue Aug 10, 2015 · 11 comments
Open

can not open local files in pd.js chrome extension #6339

skyhirider opened this issue Aug 10, 2015 · 11 comments

Comments

@skyhirider
Copy link

PDF files stored on my local hard disk can not be opened in the Chrome extension, chrome re-downloads and creates a copy of the file instead of viewing it.

Opening remote pdf files works.

Official Chrome PDF plugin ( chrome://plugins/ ) does not have this behavior and opens local files as expected by me.

@Rob--W
Copy link
Member

Rob--W commented Aug 10, 2015

Did you enable file access at chrome://extensions/?id=oemmndcbldboiebfnladdacbdfmadadm

The option is currently not very obvious, but that will change when I add #6233.

@skyhirider
Copy link
Author

Thanks, that solved my issue.

Can the extension be set to run in a separate window without the omnibox (chrome "Create application shortcut"). I want each pdf file I open to have it's own icon in my Windows taskbar so I can see all the documents I have opened just by looking at the taskbar.

PS: Found your extension when I was searching for a secure way to open PDF files: https://security.stackexchange.com/questions/65783/security-of-pdf-reader-software

@Rob--W
Copy link
Member

Rob--W commented Aug 11, 2015

Doesn't Windows put all windows of the same application under the same icon, or did you disable that? Which Windows version are you using?

Application shortcuts are only available for apps, while the PDF viewer is an extension (this distinction is sometimes confusing, especially for users, but that's where we're at...). What I could do is adding a contextmenu item at the PDF.js icon in the omnibox, which allows you to move the PDF viewer to a new minimal window.

@skyhirider
Copy link
Author

I'm using Windows 10 (behaved the same in 8.1).

The contextmenu is a good idea. Perhaps you could add an option to always open pdfs (or pdfs that match a regex, like local files only) in a new separate minimal window

It would be perfect if Adobe Reader and pdf.js behaved the same from the outside.

pdf.js would have it's own launch icon and when opened would have it's own set of tabs in the taskbar, as I would like to replace adobe reader with a browser based version (due to security concerns and the Chrome js sandbox being supposedly safer).

I don't mind it opening it in the browser. My issues are with other users I want to install this plugin for, as they may find switching between tabs in a browser confusing as they used the taskbar before and this would be a confusing change for them.

Is there a way to implement the Adobe Reader selection tool (and have it the default option when opening new files) so that parts of the text and/or images can be copied and pasted outside as an image?

@Rob--W
Copy link
Member

Rob--W commented Aug 11, 2015

@skyhirider How do you currently open the PDF with PDF.js? E.g. did you set Chrome as the default application for PDFs?

Is there a way to implement the Adobe Reader selection tool (and have it the default option when opening new files) so that parts of the text and/or images can be copied and pasted outside as an image?

Could you open a new issue for that? Then we can separately track that feature request.

@skyhirider
Copy link
Author

Yes, Chrome is set as the default application for PDF.

@Fironet
Copy link

Fironet commented Aug 17, 2015

I've found this issue in Firefox v42, too. Can't open any local PDFs but can open online PDFs. Each attempt opens the open/save dialog. I can remember this wasn't the case in v28.

@skyhirider
Copy link
Author

Chrome plugin does not open local file stored in local network drive even
with local files enabled in plugin settings.

Reproduce steps:
Close all tabs and then close Chrome
Open file located on network drive
Chrome launches and downloads the copy instead of opening
Opening the file again from local network opens it in the plugin correctly.

Tried opening network .doc files with the official Google Microsoft office
plugin and files are opened correctly.

There should be a delay time for the plugin to load?

On 16:13, Mon, 17 Aug 2015 Fironet [email protected] wrote:

I've found this issue in Firefox v42, too. Can't open any local PDFs but
can open online PDFs. Each attempt opens the open/save dialog. I can
remember this wasn't the case in v28.


Reply to this email directly or view it on GitHub
#6339 (comment).

@Rob--W
Copy link
Member

Rob--W commented Aug 22, 2015

@skyhirider That is a long-standing bug in Chrome. I have just created a bug report for it, see https://code.google.com/p/chromium/issues/detail?id=523634.

A work-around is to always have an instance of Chrome open. I'll check whether there are other more convenient ways to load PDFs.

@skyhirider
Copy link
Author

@Rob--W Is it a PDF only issue or a general file access issue?

Loading Microsoft office files using the Office Editing plugin from Google works even if Chrome is closed before opening the files.

Couldn't their workaround be implemented into pdf.js ?

Office Editing plugin https://chrome.google.com/webstore/detail/office-editing-for-docs-s/gbkeegbaiigmenfmjfclcdgdpimamgkj?hl=en

@Rob--W
Copy link
Member

Rob--W commented Aug 26, 2015

@skyhirider It is a general issue with extension loading.

QuickOffice uses NaCl (NativeClient) to render content. I want to experiment with NaCl to capture PDF files, but 1) I need to find some time for that and 2) I need a reviewer at the PDF.js team who is happy to review and accept C++ code in this repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants