How to call firefox built-in pdf viewer (pdf.js) manually?











up vote
3
down vote

favorite












I have disabled Firefox's native PDF viewer so each PDF link doesn't open automatically and gets downloaded by default. And I like it that way.



But I still want to open some PDFs in the viewer. So the question is: what can I do to call the viewer manually without switching default action every time? Like using some protocol handler similar to viewing sources (view-source:<url>), extension or bookmarklet JS code?










share|improve this question




























    up vote
    3
    down vote

    favorite












    I have disabled Firefox's native PDF viewer so each PDF link doesn't open automatically and gets downloaded by default. And I like it that way.



    But I still want to open some PDFs in the viewer. So the question is: what can I do to call the viewer manually without switching default action every time? Like using some protocol handler similar to viewing sources (view-source:<url>), extension or bookmarklet JS code?










    share|improve this question


























      up vote
      3
      down vote

      favorite









      up vote
      3
      down vote

      favorite











      I have disabled Firefox's native PDF viewer so each PDF link doesn't open automatically and gets downloaded by default. And I like it that way.



      But I still want to open some PDFs in the viewer. So the question is: what can I do to call the viewer manually without switching default action every time? Like using some protocol handler similar to viewing sources (view-source:<url>), extension or bookmarklet JS code?










      share|improve this question















      I have disabled Firefox's native PDF viewer so each PDF link doesn't open automatically and gets downloaded by default. And I like it that way.



      But I still want to open some PDFs in the viewer. So the question is: what can I do to call the viewer manually without switching default action every time? Like using some protocol handler similar to viewing sources (view-source:<url>), extension or bookmarklet JS code?







      firefox browser pdf bookmarklet






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 20 '16 at 18:17

























      asked Dec 3 '16 at 19:48









      Annarfych

      1186




      1186






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          4
          down vote



          accepted










          In Firefox web browser, go to resource://pdf.js/web/viewer.html



          The resource URL scheme will manually call the built-in PDF viewer. For some reason, the 'Open File' button in the viewer is useless in Firefox on Linux; the file selection dialog will not appear. The workaround is to drag and drop PDF file into the built-in viewer.




          1. Open a new window of Firefox web browser.


          2. In the address bar, type resource://pdf.js/web/viewer.html and hit Enter key. An empty viewer will load.


          3. Open another window of Firefox web browser and visit the page where it contains link to PDF file i.e. google "example adobe .pdf" to find relevant results.


          4. Click on target link once and hold, then move (drag) into the empty viewer and release (drop).


          5. The empty viewer will open the PDF file and the address bar will change from resource:// to https:// or such relevant URL.



          The following screenshot combo illustrates the explained steps.



          Firefox built-in PDF viewer drag and drop



          Drag and drop works for links to PDF file, as well as for local documents. Instead of link, drag the file icon from a File Manager into the empty viewer. The PDF file will open similarly.



          Tested working in Firefox 50.1.0 (legacy) and 57+ (Firefox Quantum) on Linux.






          share|improve this answer



















          • 1




            Thank you, it doesn't look neat but at least it works. Only other suggestion I found is to use "Open in Browser" extension but it just ignores internal viewer for pdfs and tries to download them anyway (albeit showing pngs etc).
            – Annarfych
            Dec 20 '16 at 18:12











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1152583%2fhow-to-call-firefox-built-in-pdf-viewer-pdf-js-manually%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          4
          down vote



          accepted










          In Firefox web browser, go to resource://pdf.js/web/viewer.html



          The resource URL scheme will manually call the built-in PDF viewer. For some reason, the 'Open File' button in the viewer is useless in Firefox on Linux; the file selection dialog will not appear. The workaround is to drag and drop PDF file into the built-in viewer.




          1. Open a new window of Firefox web browser.


          2. In the address bar, type resource://pdf.js/web/viewer.html and hit Enter key. An empty viewer will load.


          3. Open another window of Firefox web browser and visit the page where it contains link to PDF file i.e. google "example adobe .pdf" to find relevant results.


          4. Click on target link once and hold, then move (drag) into the empty viewer and release (drop).


          5. The empty viewer will open the PDF file and the address bar will change from resource:// to https:// or such relevant URL.



          The following screenshot combo illustrates the explained steps.



          Firefox built-in PDF viewer drag and drop



          Drag and drop works for links to PDF file, as well as for local documents. Instead of link, drag the file icon from a File Manager into the empty viewer. The PDF file will open similarly.



          Tested working in Firefox 50.1.0 (legacy) and 57+ (Firefox Quantum) on Linux.






          share|improve this answer



















          • 1




            Thank you, it doesn't look neat but at least it works. Only other suggestion I found is to use "Open in Browser" extension but it just ignores internal viewer for pdfs and tries to download them anyway (albeit showing pngs etc).
            – Annarfych
            Dec 20 '16 at 18:12















          up vote
          4
          down vote



          accepted










          In Firefox web browser, go to resource://pdf.js/web/viewer.html



          The resource URL scheme will manually call the built-in PDF viewer. For some reason, the 'Open File' button in the viewer is useless in Firefox on Linux; the file selection dialog will not appear. The workaround is to drag and drop PDF file into the built-in viewer.




          1. Open a new window of Firefox web browser.


          2. In the address bar, type resource://pdf.js/web/viewer.html and hit Enter key. An empty viewer will load.


          3. Open another window of Firefox web browser and visit the page where it contains link to PDF file i.e. google "example adobe .pdf" to find relevant results.


          4. Click on target link once and hold, then move (drag) into the empty viewer and release (drop).


          5. The empty viewer will open the PDF file and the address bar will change from resource:// to https:// or such relevant URL.



          The following screenshot combo illustrates the explained steps.



          Firefox built-in PDF viewer drag and drop



          Drag and drop works for links to PDF file, as well as for local documents. Instead of link, drag the file icon from a File Manager into the empty viewer. The PDF file will open similarly.



          Tested working in Firefox 50.1.0 (legacy) and 57+ (Firefox Quantum) on Linux.






          share|improve this answer



















          • 1




            Thank you, it doesn't look neat but at least it works. Only other suggestion I found is to use "Open in Browser" extension but it just ignores internal viewer for pdfs and tries to download them anyway (albeit showing pngs etc).
            – Annarfych
            Dec 20 '16 at 18:12













          up vote
          4
          down vote



          accepted







          up vote
          4
          down vote



          accepted






          In Firefox web browser, go to resource://pdf.js/web/viewer.html



          The resource URL scheme will manually call the built-in PDF viewer. For some reason, the 'Open File' button in the viewer is useless in Firefox on Linux; the file selection dialog will not appear. The workaround is to drag and drop PDF file into the built-in viewer.




          1. Open a new window of Firefox web browser.


          2. In the address bar, type resource://pdf.js/web/viewer.html and hit Enter key. An empty viewer will load.


          3. Open another window of Firefox web browser and visit the page where it contains link to PDF file i.e. google "example adobe .pdf" to find relevant results.


          4. Click on target link once and hold, then move (drag) into the empty viewer and release (drop).


          5. The empty viewer will open the PDF file and the address bar will change from resource:// to https:// or such relevant URL.



          The following screenshot combo illustrates the explained steps.



          Firefox built-in PDF viewer drag and drop



          Drag and drop works for links to PDF file, as well as for local documents. Instead of link, drag the file icon from a File Manager into the empty viewer. The PDF file will open similarly.



          Tested working in Firefox 50.1.0 (legacy) and 57+ (Firefox Quantum) on Linux.






          share|improve this answer














          In Firefox web browser, go to resource://pdf.js/web/viewer.html



          The resource URL scheme will manually call the built-in PDF viewer. For some reason, the 'Open File' button in the viewer is useless in Firefox on Linux; the file selection dialog will not appear. The workaround is to drag and drop PDF file into the built-in viewer.




          1. Open a new window of Firefox web browser.


          2. In the address bar, type resource://pdf.js/web/viewer.html and hit Enter key. An empty viewer will load.


          3. Open another window of Firefox web browser and visit the page where it contains link to PDF file i.e. google "example adobe .pdf" to find relevant results.


          4. Click on target link once and hold, then move (drag) into the empty viewer and release (drop).


          5. The empty viewer will open the PDF file and the address bar will change from resource:// to https:// or such relevant URL.



          The following screenshot combo illustrates the explained steps.



          Firefox built-in PDF viewer drag and drop



          Drag and drop works for links to PDF file, as well as for local documents. Instead of link, drag the file icon from a File Manager into the empty viewer. The PDF file will open similarly.



          Tested working in Firefox 50.1.0 (legacy) and 57+ (Firefox Quantum) on Linux.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Dec 1 at 9:06

























          answered Dec 20 '16 at 9:35









          clearkimura

          2,2361429




          2,2361429








          • 1




            Thank you, it doesn't look neat but at least it works. Only other suggestion I found is to use "Open in Browser" extension but it just ignores internal viewer for pdfs and tries to download them anyway (albeit showing pngs etc).
            – Annarfych
            Dec 20 '16 at 18:12














          • 1




            Thank you, it doesn't look neat but at least it works. Only other suggestion I found is to use "Open in Browser" extension but it just ignores internal viewer for pdfs and tries to download them anyway (albeit showing pngs etc).
            – Annarfych
            Dec 20 '16 at 18:12








          1




          1




          Thank you, it doesn't look neat but at least it works. Only other suggestion I found is to use "Open in Browser" extension but it just ignores internal viewer for pdfs and tries to download them anyway (albeit showing pngs etc).
          – Annarfych
          Dec 20 '16 at 18:12




          Thank you, it doesn't look neat but at least it works. Only other suggestion I found is to use "Open in Browser" extension but it just ignores internal viewer for pdfs and tries to download them anyway (albeit showing pngs etc).
          – Annarfych
          Dec 20 '16 at 18:12


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1152583%2fhow-to-call-firefox-built-in-pdf-viewer-pdf-js-manually%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Mouse cursor on multiple screens with different PPI

          Agildo Ribeiro

          Sometime when accessing a menu: “Ubuntu 16.04 has experienced an internal error”