pdf viewer for command line only

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
11
down vote

favorite
6












Is it possible to view pdf documents without having gdm (or similar) running?



Rationale: I'm working on a remote server (assume no X forwarding) processing some data, creating some plots (assume pdf files). And I would like to view them without having to scp and open them on my machine. (There may be other use cases, probably.)







share|improve this question
















  • 2




    I don't know the answer to the question you asked, but I use sshfs to solve problems like these. I suppose it's like using scp, but requires less hassle.
    – ams
    Apr 11 '12 at 9:01










  • @ams, this would indeed solve the copying issue, but right now I'm particularly interested in a command-line only pdf viewer.
    – moooeeeep
    Apr 11 '12 at 9:05










  • Maybe you could adept bcvi in a way that executing view-this file.pdf over SSH runs your local PDF viewer on the file.pdf via back-channel magic.
    – sr_
    Apr 11 '12 at 9:36











  • You can generate ascii graphs with gnuplot, i.e. echo 'set term dumb; plot sin(x)' | gnuplot. For improved "graphics" generate tektronix escape sequences, e.g. within xterm -t run echo 'set term tek40xx; plot sin(x)' | gnuplot
    – Thor
    Apr 13 '12 at 10:50















up vote
11
down vote

favorite
6












Is it possible to view pdf documents without having gdm (or similar) running?



Rationale: I'm working on a remote server (assume no X forwarding) processing some data, creating some plots (assume pdf files). And I would like to view them without having to scp and open them on my machine. (There may be other use cases, probably.)







share|improve this question
















  • 2




    I don't know the answer to the question you asked, but I use sshfs to solve problems like these. I suppose it's like using scp, but requires less hassle.
    – ams
    Apr 11 '12 at 9:01










  • @ams, this would indeed solve the copying issue, but right now I'm particularly interested in a command-line only pdf viewer.
    – moooeeeep
    Apr 11 '12 at 9:05










  • Maybe you could adept bcvi in a way that executing view-this file.pdf over SSH runs your local PDF viewer on the file.pdf via back-channel magic.
    – sr_
    Apr 11 '12 at 9:36











  • You can generate ascii graphs with gnuplot, i.e. echo 'set term dumb; plot sin(x)' | gnuplot. For improved "graphics" generate tektronix escape sequences, e.g. within xterm -t run echo 'set term tek40xx; plot sin(x)' | gnuplot
    – Thor
    Apr 13 '12 at 10:50













up vote
11
down vote

favorite
6









up vote
11
down vote

favorite
6






6





Is it possible to view pdf documents without having gdm (or similar) running?



Rationale: I'm working on a remote server (assume no X forwarding) processing some data, creating some plots (assume pdf files). And I would like to view them without having to scp and open them on my machine. (There may be other use cases, probably.)







share|improve this question












Is it possible to view pdf documents without having gdm (or similar) running?



Rationale: I'm working on a remote server (assume no X forwarding) processing some data, creating some plots (assume pdf files). And I would like to view them without having to scp and open them on my machine. (There may be other use cases, probably.)









share|improve this question











share|improve this question




share|improve this question










asked Apr 11 '12 at 8:55









moooeeeep

5682817




5682817







  • 2




    I don't know the answer to the question you asked, but I use sshfs to solve problems like these. I suppose it's like using scp, but requires less hassle.
    – ams
    Apr 11 '12 at 9:01










  • @ams, this would indeed solve the copying issue, but right now I'm particularly interested in a command-line only pdf viewer.
    – moooeeeep
    Apr 11 '12 at 9:05










  • Maybe you could adept bcvi in a way that executing view-this file.pdf over SSH runs your local PDF viewer on the file.pdf via back-channel magic.
    – sr_
    Apr 11 '12 at 9:36











  • You can generate ascii graphs with gnuplot, i.e. echo 'set term dumb; plot sin(x)' | gnuplot. For improved "graphics" generate tektronix escape sequences, e.g. within xterm -t run echo 'set term tek40xx; plot sin(x)' | gnuplot
    – Thor
    Apr 13 '12 at 10:50













  • 2




    I don't know the answer to the question you asked, but I use sshfs to solve problems like these. I suppose it's like using scp, but requires less hassle.
    – ams
    Apr 11 '12 at 9:01










  • @ams, this would indeed solve the copying issue, but right now I'm particularly interested in a command-line only pdf viewer.
    – moooeeeep
    Apr 11 '12 at 9:05










  • Maybe you could adept bcvi in a way that executing view-this file.pdf over SSH runs your local PDF viewer on the file.pdf via back-channel magic.
    – sr_
    Apr 11 '12 at 9:36











  • You can generate ascii graphs with gnuplot, i.e. echo 'set term dumb; plot sin(x)' | gnuplot. For improved "graphics" generate tektronix escape sequences, e.g. within xterm -t run echo 'set term tek40xx; plot sin(x)' | gnuplot
    – Thor
    Apr 13 '12 at 10:50








2




2




I don't know the answer to the question you asked, but I use sshfs to solve problems like these. I suppose it's like using scp, but requires less hassle.
– ams
Apr 11 '12 at 9:01




I don't know the answer to the question you asked, but I use sshfs to solve problems like these. I suppose it's like using scp, but requires less hassle.
– ams
Apr 11 '12 at 9:01












@ams, this would indeed solve the copying issue, but right now I'm particularly interested in a command-line only pdf viewer.
– moooeeeep
Apr 11 '12 at 9:05




@ams, this would indeed solve the copying issue, but right now I'm particularly interested in a command-line only pdf viewer.
– moooeeeep
Apr 11 '12 at 9:05












Maybe you could adept bcvi in a way that executing view-this file.pdf over SSH runs your local PDF viewer on the file.pdf via back-channel magic.
– sr_
Apr 11 '12 at 9:36





Maybe you could adept bcvi in a way that executing view-this file.pdf over SSH runs your local PDF viewer on the file.pdf via back-channel magic.
– sr_
Apr 11 '12 at 9:36













You can generate ascii graphs with gnuplot, i.e. echo 'set term dumb; plot sin(x)' | gnuplot. For improved "graphics" generate tektronix escape sequences, e.g. within xterm -t run echo 'set term tek40xx; plot sin(x)' | gnuplot
– Thor
Apr 13 '12 at 10:50





You can generate ascii graphs with gnuplot, i.e. echo 'set term dumb; plot sin(x)' | gnuplot. For improved "graphics" generate tektronix escape sequences, e.g. within xterm -t run echo 'set term tek40xx; plot sin(x)' | gnuplot
– Thor
Apr 13 '12 at 10:50











4 Answers
4






active

oldest

votes

















up vote
24
down vote



accepted










Not a real viewer, but as first aid a converter may also help:



pdftotext file.pdf - | less

pdftohtml -stdout -i file.pdf | lynx -stdin


pdftotext and pdftohtml are part of the Poppler package.






share|improve this answer
















  • 2




    +1 This works nicely with text-only documents. Obviously displaying graphics without graphical user interface is not realistic? :]
    – moooeeeep
    Apr 11 '12 at 11:06







  • 1




    +1. Also, lesspipe knows how to handle PDF documents. If pdftotext is installed and you have already run eval $(lesspipe), you can just run less file.pdf. It uses pdftotext -layout so works reasonably well with multi-column text.
    – cas
    Jan 4 at 4:28

















up vote
5
down vote













I don't think it will work remotely, but locally I used to use fbgs (Info about fbida). It converts the PDF pages to TIFF files and displays them in a contiguous fashion using the framebuffer. Including images and proper layout. However, it's slower then using a GUI viewer.






share|improve this answer






















  • Thanks for this note (it's spelled fbgs)! It looked indeed promising. Unfortunately the restriction is not in the first place locally, but any emulated terminal won't work. Apparantly it requires to be run on any of the virtual terminals ctrl+alt+f1/f2/f3/... :(
    – moooeeeep
    May 14 '12 at 11:09

















up vote
0
down vote













If you run emacs on your machine (emacs comes preinstalled on Ubuntu 18.04), you can virtually open and see a pdf on a remote server by hitting Ctrl-x Ctrl-f (to find-file) and then type in /user@hostname:/path/to/my.pdf and hit Enter (note the very first /). You will then be prompted to enter the server's password and there it is! You can see the pdf inside emacs.



Navigate through PDF inside emacs



Use space to go one page down and backspace to go one page up. You can also use arrow keys to scroll through a single page if it doesn't fit in the screen.



Zoom



Zoom in by hitting Ctrl-x Ctrl-+. Zoom in more by hitting + only. Or zoom out more by hitting -.



Context



Yes, you can connect to a remote server from within emacs using the build-in package tramp that works as simple as I explained above. This method works, not only for pdf, but for any other type of file, such as images.






share|improve this answer





























    up vote
    0
    down vote













    I use ranger, although it doesn't allow me to copy text or highlight.






    share|improve this answer




















      Your Answer







      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "106"
      ;
      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: false,
      noModals: false,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );








       

      draft saved


      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f36201%2fpdf-viewer-for-command-line-only%23new-answer', 'question_page');

      );

      Post as a guest






























      4 Answers
      4






      active

      oldest

      votes








      4 Answers
      4






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      24
      down vote



      accepted










      Not a real viewer, but as first aid a converter may also help:



      pdftotext file.pdf - | less

      pdftohtml -stdout -i file.pdf | lynx -stdin


      pdftotext and pdftohtml are part of the Poppler package.






      share|improve this answer
















      • 2




        +1 This works nicely with text-only documents. Obviously displaying graphics without graphical user interface is not realistic? :]
        – moooeeeep
        Apr 11 '12 at 11:06







      • 1




        +1. Also, lesspipe knows how to handle PDF documents. If pdftotext is installed and you have already run eval $(lesspipe), you can just run less file.pdf. It uses pdftotext -layout so works reasonably well with multi-column text.
        – cas
        Jan 4 at 4:28














      up vote
      24
      down vote



      accepted










      Not a real viewer, but as first aid a converter may also help:



      pdftotext file.pdf - | less

      pdftohtml -stdout -i file.pdf | lynx -stdin


      pdftotext and pdftohtml are part of the Poppler package.






      share|improve this answer
















      • 2




        +1 This works nicely with text-only documents. Obviously displaying graphics without graphical user interface is not realistic? :]
        – moooeeeep
        Apr 11 '12 at 11:06







      • 1




        +1. Also, lesspipe knows how to handle PDF documents. If pdftotext is installed and you have already run eval $(lesspipe), you can just run less file.pdf. It uses pdftotext -layout so works reasonably well with multi-column text.
        – cas
        Jan 4 at 4:28












      up vote
      24
      down vote



      accepted







      up vote
      24
      down vote



      accepted






      Not a real viewer, but as first aid a converter may also help:



      pdftotext file.pdf - | less

      pdftohtml -stdout -i file.pdf | lynx -stdin


      pdftotext and pdftohtml are part of the Poppler package.






      share|improve this answer












      Not a real viewer, but as first aid a converter may also help:



      pdftotext file.pdf - | less

      pdftohtml -stdout -i file.pdf | lynx -stdin


      pdftotext and pdftohtml are part of the Poppler package.







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Apr 11 '12 at 9:19









      manatwork

      21k38184




      21k38184







      • 2




        +1 This works nicely with text-only documents. Obviously displaying graphics without graphical user interface is not realistic? :]
        – moooeeeep
        Apr 11 '12 at 11:06







      • 1




        +1. Also, lesspipe knows how to handle PDF documents. If pdftotext is installed and you have already run eval $(lesspipe), you can just run less file.pdf. It uses pdftotext -layout so works reasonably well with multi-column text.
        – cas
        Jan 4 at 4:28












      • 2




        +1 This works nicely with text-only documents. Obviously displaying graphics without graphical user interface is not realistic? :]
        – moooeeeep
        Apr 11 '12 at 11:06







      • 1




        +1. Also, lesspipe knows how to handle PDF documents. If pdftotext is installed and you have already run eval $(lesspipe), you can just run less file.pdf. It uses pdftotext -layout so works reasonably well with multi-column text.
        – cas
        Jan 4 at 4:28







      2




      2




      +1 This works nicely with text-only documents. Obviously displaying graphics without graphical user interface is not realistic? :]
      – moooeeeep
      Apr 11 '12 at 11:06





      +1 This works nicely with text-only documents. Obviously displaying graphics without graphical user interface is not realistic? :]
      – moooeeeep
      Apr 11 '12 at 11:06





      1




      1




      +1. Also, lesspipe knows how to handle PDF documents. If pdftotext is installed and you have already run eval $(lesspipe), you can just run less file.pdf. It uses pdftotext -layout so works reasonably well with multi-column text.
      – cas
      Jan 4 at 4:28




      +1. Also, lesspipe knows how to handle PDF documents. If pdftotext is installed and you have already run eval $(lesspipe), you can just run less file.pdf. It uses pdftotext -layout so works reasonably well with multi-column text.
      – cas
      Jan 4 at 4:28












      up vote
      5
      down vote













      I don't think it will work remotely, but locally I used to use fbgs (Info about fbida). It converts the PDF pages to TIFF files and displays them in a contiguous fashion using the framebuffer. Including images and proper layout. However, it's slower then using a GUI viewer.






      share|improve this answer






















      • Thanks for this note (it's spelled fbgs)! It looked indeed promising. Unfortunately the restriction is not in the first place locally, but any emulated terminal won't work. Apparantly it requires to be run on any of the virtual terminals ctrl+alt+f1/f2/f3/... :(
        – moooeeeep
        May 14 '12 at 11:09














      up vote
      5
      down vote













      I don't think it will work remotely, but locally I used to use fbgs (Info about fbida). It converts the PDF pages to TIFF files and displays them in a contiguous fashion using the framebuffer. Including images and proper layout. However, it's slower then using a GUI viewer.






      share|improve this answer






















      • Thanks for this note (it's spelled fbgs)! It looked indeed promising. Unfortunately the restriction is not in the first place locally, but any emulated terminal won't work. Apparantly it requires to be run on any of the virtual terminals ctrl+alt+f1/f2/f3/... :(
        – moooeeeep
        May 14 '12 at 11:09












      up vote
      5
      down vote










      up vote
      5
      down vote









      I don't think it will work remotely, but locally I used to use fbgs (Info about fbida). It converts the PDF pages to TIFF files and displays them in a contiguous fashion using the framebuffer. Including images and proper layout. However, it's slower then using a GUI viewer.






      share|improve this answer














      I don't think it will work remotely, but locally I used to use fbgs (Info about fbida). It converts the PDF pages to TIFF files and displays them in a contiguous fashion using the framebuffer. Including images and proper layout. However, it's slower then using a GUI viewer.







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited May 14 '12 at 15:52

























      answered May 12 '12 at 17:16









      Marco

      24.2k580112




      24.2k580112











      • Thanks for this note (it's spelled fbgs)! It looked indeed promising. Unfortunately the restriction is not in the first place locally, but any emulated terminal won't work. Apparantly it requires to be run on any of the virtual terminals ctrl+alt+f1/f2/f3/... :(
        – moooeeeep
        May 14 '12 at 11:09
















      • Thanks for this note (it's spelled fbgs)! It looked indeed promising. Unfortunately the restriction is not in the first place locally, but any emulated terminal won't work. Apparantly it requires to be run on any of the virtual terminals ctrl+alt+f1/f2/f3/... :(
        – moooeeeep
        May 14 '12 at 11:09















      Thanks for this note (it's spelled fbgs)! It looked indeed promising. Unfortunately the restriction is not in the first place locally, but any emulated terminal won't work. Apparantly it requires to be run on any of the virtual terminals ctrl+alt+f1/f2/f3/... :(
      – moooeeeep
      May 14 '12 at 11:09




      Thanks for this note (it's spelled fbgs)! It looked indeed promising. Unfortunately the restriction is not in the first place locally, but any emulated terminal won't work. Apparantly it requires to be run on any of the virtual terminals ctrl+alt+f1/f2/f3/... :(
      – moooeeeep
      May 14 '12 at 11:09










      up vote
      0
      down vote













      If you run emacs on your machine (emacs comes preinstalled on Ubuntu 18.04), you can virtually open and see a pdf on a remote server by hitting Ctrl-x Ctrl-f (to find-file) and then type in /user@hostname:/path/to/my.pdf and hit Enter (note the very first /). You will then be prompted to enter the server's password and there it is! You can see the pdf inside emacs.



      Navigate through PDF inside emacs



      Use space to go one page down and backspace to go one page up. You can also use arrow keys to scroll through a single page if it doesn't fit in the screen.



      Zoom



      Zoom in by hitting Ctrl-x Ctrl-+. Zoom in more by hitting + only. Or zoom out more by hitting -.



      Context



      Yes, you can connect to a remote server from within emacs using the build-in package tramp that works as simple as I explained above. This method works, not only for pdf, but for any other type of file, such as images.






      share|improve this answer


























        up vote
        0
        down vote













        If you run emacs on your machine (emacs comes preinstalled on Ubuntu 18.04), you can virtually open and see a pdf on a remote server by hitting Ctrl-x Ctrl-f (to find-file) and then type in /user@hostname:/path/to/my.pdf and hit Enter (note the very first /). You will then be prompted to enter the server's password and there it is! You can see the pdf inside emacs.



        Navigate through PDF inside emacs



        Use space to go one page down and backspace to go one page up. You can also use arrow keys to scroll through a single page if it doesn't fit in the screen.



        Zoom



        Zoom in by hitting Ctrl-x Ctrl-+. Zoom in more by hitting + only. Or zoom out more by hitting -.



        Context



        Yes, you can connect to a remote server from within emacs using the build-in package tramp that works as simple as I explained above. This method works, not only for pdf, but for any other type of file, such as images.






        share|improve this answer
























          up vote
          0
          down vote










          up vote
          0
          down vote









          If you run emacs on your machine (emacs comes preinstalled on Ubuntu 18.04), you can virtually open and see a pdf on a remote server by hitting Ctrl-x Ctrl-f (to find-file) and then type in /user@hostname:/path/to/my.pdf and hit Enter (note the very first /). You will then be prompted to enter the server's password and there it is! You can see the pdf inside emacs.



          Navigate through PDF inside emacs



          Use space to go one page down and backspace to go one page up. You can also use arrow keys to scroll through a single page if it doesn't fit in the screen.



          Zoom



          Zoom in by hitting Ctrl-x Ctrl-+. Zoom in more by hitting + only. Or zoom out more by hitting -.



          Context



          Yes, you can connect to a remote server from within emacs using the build-in package tramp that works as simple as I explained above. This method works, not only for pdf, but for any other type of file, such as images.






          share|improve this answer














          If you run emacs on your machine (emacs comes preinstalled on Ubuntu 18.04), you can virtually open and see a pdf on a remote server by hitting Ctrl-x Ctrl-f (to find-file) and then type in /user@hostname:/path/to/my.pdf and hit Enter (note the very first /). You will then be prompted to enter the server's password and there it is! You can see the pdf inside emacs.



          Navigate through PDF inside emacs



          Use space to go one page down and backspace to go one page up. You can also use arrow keys to scroll through a single page if it doesn't fit in the screen.



          Zoom



          Zoom in by hitting Ctrl-x Ctrl-+. Zoom in more by hitting + only. Or zoom out more by hitting -.



          Context



          Yes, you can connect to a remote server from within emacs using the build-in package tramp that works as simple as I explained above. This method works, not only for pdf, but for any other type of file, such as images.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jun 24 at 20:57

























          answered Jun 23 at 18:35









          Pooya

          13




          13




















              up vote
              0
              down vote













              I use ranger, although it doesn't allow me to copy text or highlight.






              share|improve this answer
























                up vote
                0
                down vote













                I use ranger, although it doesn't allow me to copy text or highlight.






                share|improve this answer






















                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  I use ranger, although it doesn't allow me to copy text or highlight.






                  share|improve this answer












                  I use ranger, although it doesn't allow me to copy text or highlight.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Aug 9 at 2:25









                  Ricardo Pietrobon

                  1262




                  1262






















                       

                      draft saved


                      draft discarded


























                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f36201%2fpdf-viewer-for-command-line-only%23new-answer', 'question_page');

                      );

                      Post as a guest













































































                      Popular posts from this blog

                      How to check contact read email or not when send email to Individual?

                      Displaying single band from multi-band raster using QGIS

                      How many registers does an x86_64 CPU actually have?