Convert an A4R (A4 lanscape) scanned jpeg, to A4R (A4 lanscape) pdf












0














I have have scanned an A4R paper sheet to a 2048x1443 jpg file.



EDIT1 : It's already rotated to landscape (2048x1443).
END OF EDIT1



Now if I try convert it with this command :



$ convert -page A4R A4R_Scanned.jpg A4R_Scanned.pdf
$ echo $?
0


EDIT2 : There was no error message regarding the A4R argument.
END OF EDIT2



I get a blank US Letter, Portrait page :



$ identify A4R_Scanned.pdf
**** Warning: File has an empty MediaBox. Using the current page size instead.
Output may be incorrect.
**** Warning: File has an empty MediaBox. Using the current page size instead.
Output may be incorrect.
A4R_Scanned.pdf PDF 595x842 595x842+0+0 16-bit Bilevel DirectClass 63.2K


EDIT3 : I tried another solution :



$ convert -page A4 -rotate 90 A4R_Scanned.jpg A4R_Scanned2A4.pdf


This gives a satisfying A4 document with no visible quality loss but I need to rotate it back to have an A4R (landscape).



When I do that, more quality is lost and that's visible :



$ convert -rotate -90 A4R_Scanned2A4.pdf A4R_Scanned2A4R.pdf


Now, my question is : How do I rotate the document back without loosing too much quality ?



END OF EDIT3



EDIT4 : Thanks to dirkt, the conversion can be done in one step and the quality is good :-) :



$ convert -page 842x595 A4R_Scanned.jpg A4R_Scanned2A4R.pdf


END OF EDIT4










share|improve this question





























    0














    I have have scanned an A4R paper sheet to a 2048x1443 jpg file.



    EDIT1 : It's already rotated to landscape (2048x1443).
    END OF EDIT1



    Now if I try convert it with this command :



    $ convert -page A4R A4R_Scanned.jpg A4R_Scanned.pdf
    $ echo $?
    0


    EDIT2 : There was no error message regarding the A4R argument.
    END OF EDIT2



    I get a blank US Letter, Portrait page :



    $ identify A4R_Scanned.pdf
    **** Warning: File has an empty MediaBox. Using the current page size instead.
    Output may be incorrect.
    **** Warning: File has an empty MediaBox. Using the current page size instead.
    Output may be incorrect.
    A4R_Scanned.pdf PDF 595x842 595x842+0+0 16-bit Bilevel DirectClass 63.2K


    EDIT3 : I tried another solution :



    $ convert -page A4 -rotate 90 A4R_Scanned.jpg A4R_Scanned2A4.pdf


    This gives a satisfying A4 document with no visible quality loss but I need to rotate it back to have an A4R (landscape).



    When I do that, more quality is lost and that's visible :



    $ convert -rotate -90 A4R_Scanned2A4.pdf A4R_Scanned2A4R.pdf


    Now, my question is : How do I rotate the document back without loosing too much quality ?



    END OF EDIT3



    EDIT4 : Thanks to dirkt, the conversion can be done in one step and the quality is good :-) :



    $ convert -page 842x595 A4R_Scanned.jpg A4R_Scanned2A4R.pdf


    END OF EDIT4










    share|improve this question



























      0












      0








      0







      I have have scanned an A4R paper sheet to a 2048x1443 jpg file.



      EDIT1 : It's already rotated to landscape (2048x1443).
      END OF EDIT1



      Now if I try convert it with this command :



      $ convert -page A4R A4R_Scanned.jpg A4R_Scanned.pdf
      $ echo $?
      0


      EDIT2 : There was no error message regarding the A4R argument.
      END OF EDIT2



      I get a blank US Letter, Portrait page :



      $ identify A4R_Scanned.pdf
      **** Warning: File has an empty MediaBox. Using the current page size instead.
      Output may be incorrect.
      **** Warning: File has an empty MediaBox. Using the current page size instead.
      Output may be incorrect.
      A4R_Scanned.pdf PDF 595x842 595x842+0+0 16-bit Bilevel DirectClass 63.2K


      EDIT3 : I tried another solution :



      $ convert -page A4 -rotate 90 A4R_Scanned.jpg A4R_Scanned2A4.pdf


      This gives a satisfying A4 document with no visible quality loss but I need to rotate it back to have an A4R (landscape).



      When I do that, more quality is lost and that's visible :



      $ convert -rotate -90 A4R_Scanned2A4.pdf A4R_Scanned2A4R.pdf


      Now, my question is : How do I rotate the document back without loosing too much quality ?



      END OF EDIT3



      EDIT4 : Thanks to dirkt, the conversion can be done in one step and the quality is good :-) :



      $ convert -page 842x595 A4R_Scanned.jpg A4R_Scanned2A4R.pdf


      END OF EDIT4










      share|improve this question















      I have have scanned an A4R paper sheet to a 2048x1443 jpg file.



      EDIT1 : It's already rotated to landscape (2048x1443).
      END OF EDIT1



      Now if I try convert it with this command :



      $ convert -page A4R A4R_Scanned.jpg A4R_Scanned.pdf
      $ echo $?
      0


      EDIT2 : There was no error message regarding the A4R argument.
      END OF EDIT2



      I get a blank US Letter, Portrait page :



      $ identify A4R_Scanned.pdf
      **** Warning: File has an empty MediaBox. Using the current page size instead.
      Output may be incorrect.
      **** Warning: File has an empty MediaBox. Using the current page size instead.
      Output may be incorrect.
      A4R_Scanned.pdf PDF 595x842 595x842+0+0 16-bit Bilevel DirectClass 63.2K


      EDIT3 : I tried another solution :



      $ convert -page A4 -rotate 90 A4R_Scanned.jpg A4R_Scanned2A4.pdf


      This gives a satisfying A4 document with no visible quality loss but I need to rotate it back to have an A4R (landscape).



      When I do that, more quality is lost and that's visible :



      $ convert -rotate -90 A4R_Scanned2A4.pdf A4R_Scanned2A4R.pdf


      Now, my question is : How do I rotate the document back without loosing too much quality ?



      END OF EDIT3



      EDIT4 : Thanks to dirkt, the conversion can be done in one step and the quality is good :-) :



      $ convert -page 842x595 A4R_Scanned.jpg A4R_Scanned2A4R.pdf


      END OF EDIT4







      pdf conversion imagemagick






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 18 at 9:13

























      asked Dec 13 at 18:36









      SebMa

      2151411




      2151411






















          1 Answer
          1






          active

          oldest

          votes


















          1














          A simple look at the documentation of the -page command line options shows that A4R doesn't exist (and I've never heard of a format with this name). If you mean A4, use -page A4 instead. If you mean something like "A4 with an extra feature that's called R", you possibly have to do some extra things for "R", whatever that is.



          Edit: If "R" means "rotated", have a look at the -rotate option.



          I wouldn't be surprised if you also got an error message while calling convert which complained about this.



          Edit



          If I understand the edit's correctly, the problem is that you want landscape without rotating. The problem here is that the PDF format has various ways to flag "landscape": You can either have actual landscape (bounding box width greater than height), or you can store a portrait image and add a Rotation entry. (Also see this question). And what various tools do in this respect is always a bit hit or miss.



          One of the simplest things you can try is to use -page 842x595 (A4 is just a shorthand for 595x842) and see what happens.



          Anything else will probably require to take a closer look at what happens by inspecting the PDFs that are generated by your imagemagick/graphicsmagick convert and you current version.






          share|improve this answer



















          • 1




            A4R sounds to me like a shorthand some multifunction copier/printers might use for "A4 rotated", or in other words, A4 paper in landscape orientation.
            – telcoM
            Dec 14 at 8:36










          • @dirkt Hi, please see my EDITs.
            – SebMa
            Dec 17 at 11:15










          • @dirkt Thanks a lot. God bess you :-)
            – SebMa
            Dec 18 at 9: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%2f487826%2fconvert-an-a4r-a4-lanscape-scanned-jpeg-to-a4r-a4-lanscape-pdf%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









          1














          A simple look at the documentation of the -page command line options shows that A4R doesn't exist (and I've never heard of a format with this name). If you mean A4, use -page A4 instead. If you mean something like "A4 with an extra feature that's called R", you possibly have to do some extra things for "R", whatever that is.



          Edit: If "R" means "rotated", have a look at the -rotate option.



          I wouldn't be surprised if you also got an error message while calling convert which complained about this.



          Edit



          If I understand the edit's correctly, the problem is that you want landscape without rotating. The problem here is that the PDF format has various ways to flag "landscape": You can either have actual landscape (bounding box width greater than height), or you can store a portrait image and add a Rotation entry. (Also see this question). And what various tools do in this respect is always a bit hit or miss.



          One of the simplest things you can try is to use -page 842x595 (A4 is just a shorthand for 595x842) and see what happens.



          Anything else will probably require to take a closer look at what happens by inspecting the PDFs that are generated by your imagemagick/graphicsmagick convert and you current version.






          share|improve this answer



















          • 1




            A4R sounds to me like a shorthand some multifunction copier/printers might use for "A4 rotated", or in other words, A4 paper in landscape orientation.
            – telcoM
            Dec 14 at 8:36










          • @dirkt Hi, please see my EDITs.
            – SebMa
            Dec 17 at 11:15










          • @dirkt Thanks a lot. God bess you :-)
            – SebMa
            Dec 18 at 9:13
















          1














          A simple look at the documentation of the -page command line options shows that A4R doesn't exist (and I've never heard of a format with this name). If you mean A4, use -page A4 instead. If you mean something like "A4 with an extra feature that's called R", you possibly have to do some extra things for "R", whatever that is.



          Edit: If "R" means "rotated", have a look at the -rotate option.



          I wouldn't be surprised if you also got an error message while calling convert which complained about this.



          Edit



          If I understand the edit's correctly, the problem is that you want landscape without rotating. The problem here is that the PDF format has various ways to flag "landscape": You can either have actual landscape (bounding box width greater than height), or you can store a portrait image and add a Rotation entry. (Also see this question). And what various tools do in this respect is always a bit hit or miss.



          One of the simplest things you can try is to use -page 842x595 (A4 is just a shorthand for 595x842) and see what happens.



          Anything else will probably require to take a closer look at what happens by inspecting the PDFs that are generated by your imagemagick/graphicsmagick convert and you current version.






          share|improve this answer



















          • 1




            A4R sounds to me like a shorthand some multifunction copier/printers might use for "A4 rotated", or in other words, A4 paper in landscape orientation.
            – telcoM
            Dec 14 at 8:36










          • @dirkt Hi, please see my EDITs.
            – SebMa
            Dec 17 at 11:15










          • @dirkt Thanks a lot. God bess you :-)
            – SebMa
            Dec 18 at 9:13














          1












          1








          1






          A simple look at the documentation of the -page command line options shows that A4R doesn't exist (and I've never heard of a format with this name). If you mean A4, use -page A4 instead. If you mean something like "A4 with an extra feature that's called R", you possibly have to do some extra things for "R", whatever that is.



          Edit: If "R" means "rotated", have a look at the -rotate option.



          I wouldn't be surprised if you also got an error message while calling convert which complained about this.



          Edit



          If I understand the edit's correctly, the problem is that you want landscape without rotating. The problem here is that the PDF format has various ways to flag "landscape": You can either have actual landscape (bounding box width greater than height), or you can store a portrait image and add a Rotation entry. (Also see this question). And what various tools do in this respect is always a bit hit or miss.



          One of the simplest things you can try is to use -page 842x595 (A4 is just a shorthand for 595x842) and see what happens.



          Anything else will probably require to take a closer look at what happens by inspecting the PDFs that are generated by your imagemagick/graphicsmagick convert and you current version.






          share|improve this answer














          A simple look at the documentation of the -page command line options shows that A4R doesn't exist (and I've never heard of a format with this name). If you mean A4, use -page A4 instead. If you mean something like "A4 with an extra feature that's called R", you possibly have to do some extra things for "R", whatever that is.



          Edit: If "R" means "rotated", have a look at the -rotate option.



          I wouldn't be surprised if you also got an error message while calling convert which complained about this.



          Edit



          If I understand the edit's correctly, the problem is that you want landscape without rotating. The problem here is that the PDF format has various ways to flag "landscape": You can either have actual landscape (bounding box width greater than height), or you can store a portrait image and add a Rotation entry. (Also see this question). And what various tools do in this respect is always a bit hit or miss.



          One of the simplest things you can try is to use -page 842x595 (A4 is just a shorthand for 595x842) and see what happens.



          Anything else will probably require to take a closer look at what happens by inspecting the PDFs that are generated by your imagemagick/graphicsmagick convert and you current version.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Dec 17 at 11:41

























          answered Dec 14 at 7:27









          dirkt

          16.6k21335




          16.6k21335








          • 1




            A4R sounds to me like a shorthand some multifunction copier/printers might use for "A4 rotated", or in other words, A4 paper in landscape orientation.
            – telcoM
            Dec 14 at 8:36










          • @dirkt Hi, please see my EDITs.
            – SebMa
            Dec 17 at 11:15










          • @dirkt Thanks a lot. God bess you :-)
            – SebMa
            Dec 18 at 9:13














          • 1




            A4R sounds to me like a shorthand some multifunction copier/printers might use for "A4 rotated", or in other words, A4 paper in landscape orientation.
            – telcoM
            Dec 14 at 8:36










          • @dirkt Hi, please see my EDITs.
            – SebMa
            Dec 17 at 11:15










          • @dirkt Thanks a lot. God bess you :-)
            – SebMa
            Dec 18 at 9:13








          1




          1




          A4R sounds to me like a shorthand some multifunction copier/printers might use for "A4 rotated", or in other words, A4 paper in landscape orientation.
          – telcoM
          Dec 14 at 8:36




          A4R sounds to me like a shorthand some multifunction copier/printers might use for "A4 rotated", or in other words, A4 paper in landscape orientation.
          – telcoM
          Dec 14 at 8:36












          @dirkt Hi, please see my EDITs.
          – SebMa
          Dec 17 at 11:15




          @dirkt Hi, please see my EDITs.
          – SebMa
          Dec 17 at 11:15












          @dirkt Thanks a lot. God bess you :-)
          – SebMa
          Dec 18 at 9:13




          @dirkt Thanks a lot. God bess you :-)
          – SebMa
          Dec 18 at 9: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.





          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%2funix.stackexchange.com%2fquestions%2f487826%2fconvert-an-a4r-a4-lanscape-scanned-jpeg-to-a4r-a4-lanscape-pdf%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

          Morgemoulin

          Scott Moir

          Souastre