Print PDF from command line in Linux: similar to enscript -2lr












0















I used to print two pages of text on a single side of letter/A4 size paper, each page being a single column on that side.



It was a good balance between readability and saving paper. I was able to do this using a single command:



enscript -2r myTextFile.txt


Is there an modern equivalent, being able to print PDF files in a similar fashion from the command line? When I was using enscript, I was using an Apollo workstation :)



Thanks in advance










share|improve this question
















bumped to the homepage by Community 16 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.




















    0















    I used to print two pages of text on a single side of letter/A4 size paper, each page being a single column on that side.



    It was a good balance between readability and saving paper. I was able to do this using a single command:



    enscript -2r myTextFile.txt


    Is there an modern equivalent, being able to print PDF files in a similar fashion from the command line? When I was using enscript, I was using an Apollo workstation :)



    Thanks in advance










    share|improve this question
















    bumped to the homepage by Community 16 mins ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.


















      0












      0








      0








      I used to print two pages of text on a single side of letter/A4 size paper, each page being a single column on that side.



      It was a good balance between readability and saving paper. I was able to do this using a single command:



      enscript -2r myTextFile.txt


      Is there an modern equivalent, being able to print PDF files in a similar fashion from the command line? When I was using enscript, I was using an Apollo workstation :)



      Thanks in advance










      share|improve this question
















      I used to print two pages of text on a single side of letter/A4 size paper, each page being a single column on that side.



      It was a good balance between readability and saving paper. I was able to do this using a single command:



      enscript -2r myTextFile.txt


      Is there an modern equivalent, being able to print PDF files in a similar fashion from the command line? When I was using enscript, I was using an Apollo workstation :)



      Thanks in advance







      linux command-line pdf






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Feb 2 '18 at 8:52









      mjturner

      4,1381426




      4,1381426










      asked Feb 2 '18 at 2:45









      Harvey KingHarvey King

      11




      11





      bumped to the homepage by Community 16 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community 16 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
























          1 Answer
          1






          active

          oldest

          votes


















          0














          If you're using CUPS printing system, this functionality is included; you won't need any specific tool for that. Just as Theophrastus indicated in a comment, you can use a job option: -o number-up=2 with the CUPS basic printing command lp or with the BSD-compatibility command lpr.



          If you're using some other printing system that does not include that functionality, you may have to construct a pipeline like this:



          pdftops your-PDF-file.pdf | psnup -2 | lp


          You may have to add some options to this pipeline to select paper size, printer, etc.



          In Debian at least, the pdftops utility is in poppler-utils package, and psnup is in psutils.






          share|improve this answer
























          • I am using CUPS printing system. Are you saying I can just lp pdf file directly like this: lp -o number-up=2 myPDF.pdf neither lp or lpr man page says anything about be able to print PDF directly... (I guess that reveals how old I really am...)

            – Harvey King
            Feb 3 '18 at 8:06











          • Unless you're using a "raw" print queue in CUPS, yes. Modern versions of CUPS are using PDF as an interchange format, i.e. if given a file that cannot be directly fed to the printer (according to its PPD file), it gets first converted to PDF and then to whatever the printer is capable of printing (PS, PCL, PWG Raster or whatever its printing language is). As a result, PDFs are easy for CUPS.

            – telcoM
            Feb 3 '18 at 11:13











          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',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          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%2funix.stackexchange.com%2fquestions%2f421341%2fprint-pdf-from-command-line-in-linux-similar-to-enscript-2lr%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









          0














          If you're using CUPS printing system, this functionality is included; you won't need any specific tool for that. Just as Theophrastus indicated in a comment, you can use a job option: -o number-up=2 with the CUPS basic printing command lp or with the BSD-compatibility command lpr.



          If you're using some other printing system that does not include that functionality, you may have to construct a pipeline like this:



          pdftops your-PDF-file.pdf | psnup -2 | lp


          You may have to add some options to this pipeline to select paper size, printer, etc.



          In Debian at least, the pdftops utility is in poppler-utils package, and psnup is in psutils.






          share|improve this answer
























          • I am using CUPS printing system. Are you saying I can just lp pdf file directly like this: lp -o number-up=2 myPDF.pdf neither lp or lpr man page says anything about be able to print PDF directly... (I guess that reveals how old I really am...)

            – Harvey King
            Feb 3 '18 at 8:06











          • Unless you're using a "raw" print queue in CUPS, yes. Modern versions of CUPS are using PDF as an interchange format, i.e. if given a file that cannot be directly fed to the printer (according to its PPD file), it gets first converted to PDF and then to whatever the printer is capable of printing (PS, PCL, PWG Raster or whatever its printing language is). As a result, PDFs are easy for CUPS.

            – telcoM
            Feb 3 '18 at 11:13
















          0














          If you're using CUPS printing system, this functionality is included; you won't need any specific tool for that. Just as Theophrastus indicated in a comment, you can use a job option: -o number-up=2 with the CUPS basic printing command lp or with the BSD-compatibility command lpr.



          If you're using some other printing system that does not include that functionality, you may have to construct a pipeline like this:



          pdftops your-PDF-file.pdf | psnup -2 | lp


          You may have to add some options to this pipeline to select paper size, printer, etc.



          In Debian at least, the pdftops utility is in poppler-utils package, and psnup is in psutils.






          share|improve this answer
























          • I am using CUPS printing system. Are you saying I can just lp pdf file directly like this: lp -o number-up=2 myPDF.pdf neither lp or lpr man page says anything about be able to print PDF directly... (I guess that reveals how old I really am...)

            – Harvey King
            Feb 3 '18 at 8:06











          • Unless you're using a "raw" print queue in CUPS, yes. Modern versions of CUPS are using PDF as an interchange format, i.e. if given a file that cannot be directly fed to the printer (according to its PPD file), it gets first converted to PDF and then to whatever the printer is capable of printing (PS, PCL, PWG Raster or whatever its printing language is). As a result, PDFs are easy for CUPS.

            – telcoM
            Feb 3 '18 at 11:13














          0












          0








          0







          If you're using CUPS printing system, this functionality is included; you won't need any specific tool for that. Just as Theophrastus indicated in a comment, you can use a job option: -o number-up=2 with the CUPS basic printing command lp or with the BSD-compatibility command lpr.



          If you're using some other printing system that does not include that functionality, you may have to construct a pipeline like this:



          pdftops your-PDF-file.pdf | psnup -2 | lp


          You may have to add some options to this pipeline to select paper size, printer, etc.



          In Debian at least, the pdftops utility is in poppler-utils package, and psnup is in psutils.






          share|improve this answer













          If you're using CUPS printing system, this functionality is included; you won't need any specific tool for that. Just as Theophrastus indicated in a comment, you can use a job option: -o number-up=2 with the CUPS basic printing command lp or with the BSD-compatibility command lpr.



          If you're using some other printing system that does not include that functionality, you may have to construct a pipeline like this:



          pdftops your-PDF-file.pdf | psnup -2 | lp


          You may have to add some options to this pipeline to select paper size, printer, etc.



          In Debian at least, the pdftops utility is in poppler-utils package, and psnup is in psutils.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Feb 2 '18 at 6:43









          telcoMtelcoM

          16.4k12244




          16.4k12244













          • I am using CUPS printing system. Are you saying I can just lp pdf file directly like this: lp -o number-up=2 myPDF.pdf neither lp or lpr man page says anything about be able to print PDF directly... (I guess that reveals how old I really am...)

            – Harvey King
            Feb 3 '18 at 8:06











          • Unless you're using a "raw" print queue in CUPS, yes. Modern versions of CUPS are using PDF as an interchange format, i.e. if given a file that cannot be directly fed to the printer (according to its PPD file), it gets first converted to PDF and then to whatever the printer is capable of printing (PS, PCL, PWG Raster or whatever its printing language is). As a result, PDFs are easy for CUPS.

            – telcoM
            Feb 3 '18 at 11:13



















          • I am using CUPS printing system. Are you saying I can just lp pdf file directly like this: lp -o number-up=2 myPDF.pdf neither lp or lpr man page says anything about be able to print PDF directly... (I guess that reveals how old I really am...)

            – Harvey King
            Feb 3 '18 at 8:06











          • Unless you're using a "raw" print queue in CUPS, yes. Modern versions of CUPS are using PDF as an interchange format, i.e. if given a file that cannot be directly fed to the printer (according to its PPD file), it gets first converted to PDF and then to whatever the printer is capable of printing (PS, PCL, PWG Raster or whatever its printing language is). As a result, PDFs are easy for CUPS.

            – telcoM
            Feb 3 '18 at 11:13

















          I am using CUPS printing system. Are you saying I can just lp pdf file directly like this: lp -o number-up=2 myPDF.pdf neither lp or lpr man page says anything about be able to print PDF directly... (I guess that reveals how old I really am...)

          – Harvey King
          Feb 3 '18 at 8:06





          I am using CUPS printing system. Are you saying I can just lp pdf file directly like this: lp -o number-up=2 myPDF.pdf neither lp or lpr man page says anything about be able to print PDF directly... (I guess that reveals how old I really am...)

          – Harvey King
          Feb 3 '18 at 8:06













          Unless you're using a "raw" print queue in CUPS, yes. Modern versions of CUPS are using PDF as an interchange format, i.e. if given a file that cannot be directly fed to the printer (according to its PPD file), it gets first converted to PDF and then to whatever the printer is capable of printing (PS, PCL, PWG Raster or whatever its printing language is). As a result, PDFs are easy for CUPS.

          – telcoM
          Feb 3 '18 at 11:13





          Unless you're using a "raw" print queue in CUPS, yes. Modern versions of CUPS are using PDF as an interchange format, i.e. if given a file that cannot be directly fed to the printer (according to its PPD file), it gets first converted to PDF and then to whatever the printer is capable of printing (PS, PCL, PWG Raster or whatever its printing language is). As a result, PDFs are easy for CUPS.

          – telcoM
          Feb 3 '18 at 11:13


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • 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%2funix.stackexchange.com%2fquestions%2f421341%2fprint-pdf-from-command-line-in-linux-similar-to-enscript-2lr%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

          CARDNET

          Boot-repair Failure: Unable to locate package grub-common:i386

          濃尾地震