Using pdf.js with zotero

I am using pdf.js to display pdfs in Firefox, and it works OK. However, when I open pdfs stored in my zotero library, they open in Preview.app, not in the browser window. It is possible to get them to open in the browser window instead? I fiddled around with the Applications preference in Firefox, but it only seems to give me the option to pick another app to display pdfs, not a Firefox plugin. I also looked at the settings in about:config, but nothing jumped out at me.

Many thanks in advance for any help,

Ed.

OS X 10.7.3
Firefox 9.0.1
Zotero 3.0.1
pdf.js 0.2.168
  • I have the same issue as hagenlab, but more.

    Since I am a Mac firefox user, and there is no satisfactory plugin for pdf's on Firefox for Macs (Adobe does not support it, and the PDF plugin from Schubert|it is mediocre and not free for everyone), I am interested in the pdf-js project from Mozilla, which may be incorporated into Firefox one day. The problem is when a page is saved as an attachment into Zotero, it is the html rendering (or something of that sort, I am no expert on any of this), not the original pdf. There appears to be a "download file" mechanism within this add-on at least within the development branch (http://mozilla.github.com/pdf.js/extensions/firefox/pdf.js.xpi).

    Could Zotero be made to save the pdf being displayed, but not its rendering (if that's really what is happening)?
  • Yes, I also have the problem that enozkan discusses.
  • The mechanism that Zotero uses to determine whether a given file can be opened in Firefox doesn't work because Zotero can't detect that pdf.js allows Firefox to handle PDFs internally. However, I've implemented a workaround specifically for pdf.js for the next version.
  • Thanks, Simon. That would resolve the problem hagenlab reports, and would be a huge help.

    Is there any solution for the second problem? Otherwise, one has to download the pdf to disk and manually attach it to a Zotero entry.
  • Also fixed with more pdf.js-specific hacks.
  • With Zotero 3.0.3, I can confirm that both the fixes work. Great! Thank you, Simon.

    There is one extremely minor point: When the pdf is attached to a Zotero entry from pdf-js, its name is the full http address, instead of the pdf file name. Something like "http://.../.../.../.../filename.pdf", instead of "filename.pdf". This does not matter for me, since I always "rename file from parent metadata", but others may complain.
  • I am using Zotero 3.0.3, but am encountering the same problems as hagenlab and enozkan. (Perhaps this is due to using a more recent version of FF or pdf.js.)

    The "View PDF" and "Open in External Viewer" options are both available when I right-click on PDFs in the Zotero window, but the document opens in Adobe Acrobat when I use either option.

    Please let me know how I can view PDFs in FF. Thanks.

    OS X 10.7.3
    Firefox 10.0.2
    Zotero 3.0.3
    pdf.js 0.2.218
    extensions.zotero.launchNonNativeFiles == false
  • This is working fine for me with Firefox 10-13 and the latest version of pdf.js. What happens when you open a PDF file in Firefox using File->Open File?
  • When I open a PDF file in Firefox using File->Open File, the file opens in Adobe Acrobat. Should I change a setting in the Firefox preferences?
  • When I open a PDF file in Firefox using File->Open File, the file opens in Adobe Acrobat. Should I change a setting in the Firefox preferences?
  • You could try that, but it may be easier to delete mimeTypes.rdf, which will reset file opening settings to the default.
  • Deleting mimeTypes.rdf solved the problem. Thanks.
  • This issue has reappeared for me.

    Zotero has recently reverted to saving htmls rather than pdfs. Since there were no updates to Zotero as this happened, I assume it was an update to pdf-js that caused this, possibly in their 0.6 branch. I am using the following:

    Firefox 16.0.2
    PDF viewer 0.6.129
    Mac 10.6.8

    P.S. As a diversion, I would also like to make the point here that an integrated viewer (including for pdfs, possibly within Zotero Standalone) would make Zotero the ultimate scientist's helper. I know that, instead, we should and do use separate pdf viewer and annotator software, and I also understand the issue of developer time and resources, plus the differences between all the OS platforms. But this would actually make the Zotero experience remarkably amazing, possibly even better than that of those pesky friends of mine making fun of me for not using Papers. A high-in-the-sky feature request this is, but I still wanted to put this in the ears of core developers that might end up reading this. Sorry for the noise.
  • This was due to a change in pdf.js, and we have a fix already implemented for the next Zotero release.
  • Thank you, Simon. As usual, you guys are on top of it.
  • (I know that Simon is very keen on having a built-in PDF viewer, too, so this isn't completely out there as a feature - when I talked to him, he didn't feel that pdf.js was mature enough for that yet, but that's almost certainly going to be the way this will happen.)
  • I imagined. I agree 100% that pdf.js is not mature. Fingers crossed.
Sign In or Register to comment.