Skewed scanned PDF

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








up vote
1
down vote

favorite












I have recently scanned a book into a 600 page PDF file. However the pages are randomly skewed/rotated clockwise or counterclockwise. Any software to automatically correct this ? I know Acrobat Pro can, but any free Ubuntu software / script ?







share|improve this question


























    up vote
    1
    down vote

    favorite












    I have recently scanned a book into a 600 page PDF file. However the pages are randomly skewed/rotated clockwise or counterclockwise. Any software to automatically correct this ? I know Acrobat Pro can, but any free Ubuntu software / script ?







    share|improve this question
























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I have recently scanned a book into a 600 page PDF file. However the pages are randomly skewed/rotated clockwise or counterclockwise. Any software to automatically correct this ? I know Acrobat Pro can, but any free Ubuntu software / script ?







      share|improve this question














      I have recently scanned a book into a 600 page PDF file. However the pages are randomly skewed/rotated clockwise or counterclockwise. Any software to automatically correct this ? I know Acrobat Pro can, but any free Ubuntu software / script ?









      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 26 at 23:57









      Emily

      612317




      612317










      asked Apr 26 at 18:54









      Allan Ripley

      62




      62




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote













          Do you mean skewed—as in, stretched in some way, like this:



          parallelogram



          —or rotated?



          I'm assuming you mean rotated, since I honestly don't think it's possible for your scanner to mess the image up that badly!



          If you just need to rotate, I would recommend PDF-Shuffler, a GUI-based program that can make the process of going through each page and rotating them as necessary a lot less painful. Have a look. And I'm sure there are other programs that could do the same thing.



          Unfortunately, I don't know of any software that can look over all the pages in your PDF and decide for you which ones need to be transformed in some complex way, let alone rotated.



          EDIT: If your file was a native pdf that could be converted into postscript (.ps) format, I think it's possible there is a way to autorotate pages using ghostscript. However, to my knowledge, you can't do this with scanned pages, because the auto-rotate feature relies on interpretation of text direction, which can only come from a native pdf or ps document. I'm not completely sure...I will look into this a little more.






          share|improve this answer






















          • Should actually be a fairly solvable problem. Text typically has a right margin, which is mostly straight, with few figures outside this.
            – vidarlo
            Apr 27 at 15:03










          • @vidarlo, that's a good point. Sadly, I don't know how to write that script myself :(. It makes me think, though, that it if the asker didn't mind exporting all the pages to individual files, s/he could easily use a preexisting GIMP script to autorotate each page, then merge the pages back into one single pdf with pdftk or even with GIMP's export as mng, then command line convert mng to pdf.
            – Emily
            Apr 27 at 15:37











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "89"
          ;
          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: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          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%2faskubuntu.com%2fquestions%2f1028507%2fskewed-scanned-pdf%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote













          Do you mean skewed—as in, stretched in some way, like this:



          parallelogram



          —or rotated?



          I'm assuming you mean rotated, since I honestly don't think it's possible for your scanner to mess the image up that badly!



          If you just need to rotate, I would recommend PDF-Shuffler, a GUI-based program that can make the process of going through each page and rotating them as necessary a lot less painful. Have a look. And I'm sure there are other programs that could do the same thing.



          Unfortunately, I don't know of any software that can look over all the pages in your PDF and decide for you which ones need to be transformed in some complex way, let alone rotated.



          EDIT: If your file was a native pdf that could be converted into postscript (.ps) format, I think it's possible there is a way to autorotate pages using ghostscript. However, to my knowledge, you can't do this with scanned pages, because the auto-rotate feature relies on interpretation of text direction, which can only come from a native pdf or ps document. I'm not completely sure...I will look into this a little more.






          share|improve this answer






















          • Should actually be a fairly solvable problem. Text typically has a right margin, which is mostly straight, with few figures outside this.
            – vidarlo
            Apr 27 at 15:03










          • @vidarlo, that's a good point. Sadly, I don't know how to write that script myself :(. It makes me think, though, that it if the asker didn't mind exporting all the pages to individual files, s/he could easily use a preexisting GIMP script to autorotate each page, then merge the pages back into one single pdf with pdftk or even with GIMP's export as mng, then command line convert mng to pdf.
            – Emily
            Apr 27 at 15:37















          up vote
          1
          down vote













          Do you mean skewed—as in, stretched in some way, like this:



          parallelogram



          —or rotated?



          I'm assuming you mean rotated, since I honestly don't think it's possible for your scanner to mess the image up that badly!



          If you just need to rotate, I would recommend PDF-Shuffler, a GUI-based program that can make the process of going through each page and rotating them as necessary a lot less painful. Have a look. And I'm sure there are other programs that could do the same thing.



          Unfortunately, I don't know of any software that can look over all the pages in your PDF and decide for you which ones need to be transformed in some complex way, let alone rotated.



          EDIT: If your file was a native pdf that could be converted into postscript (.ps) format, I think it's possible there is a way to autorotate pages using ghostscript. However, to my knowledge, you can't do this with scanned pages, because the auto-rotate feature relies on interpretation of text direction, which can only come from a native pdf or ps document. I'm not completely sure...I will look into this a little more.






          share|improve this answer






















          • Should actually be a fairly solvable problem. Text typically has a right margin, which is mostly straight, with few figures outside this.
            – vidarlo
            Apr 27 at 15:03










          • @vidarlo, that's a good point. Sadly, I don't know how to write that script myself :(. It makes me think, though, that it if the asker didn't mind exporting all the pages to individual files, s/he could easily use a preexisting GIMP script to autorotate each page, then merge the pages back into one single pdf with pdftk or even with GIMP's export as mng, then command line convert mng to pdf.
            – Emily
            Apr 27 at 15:37













          up vote
          1
          down vote










          up vote
          1
          down vote









          Do you mean skewed—as in, stretched in some way, like this:



          parallelogram



          —or rotated?



          I'm assuming you mean rotated, since I honestly don't think it's possible for your scanner to mess the image up that badly!



          If you just need to rotate, I would recommend PDF-Shuffler, a GUI-based program that can make the process of going through each page and rotating them as necessary a lot less painful. Have a look. And I'm sure there are other programs that could do the same thing.



          Unfortunately, I don't know of any software that can look over all the pages in your PDF and decide for you which ones need to be transformed in some complex way, let alone rotated.



          EDIT: If your file was a native pdf that could be converted into postscript (.ps) format, I think it's possible there is a way to autorotate pages using ghostscript. However, to my knowledge, you can't do this with scanned pages, because the auto-rotate feature relies on interpretation of text direction, which can only come from a native pdf or ps document. I'm not completely sure...I will look into this a little more.






          share|improve this answer














          Do you mean skewed—as in, stretched in some way, like this:



          parallelogram



          —or rotated?



          I'm assuming you mean rotated, since I honestly don't think it's possible for your scanner to mess the image up that badly!



          If you just need to rotate, I would recommend PDF-Shuffler, a GUI-based program that can make the process of going through each page and rotating them as necessary a lot less painful. Have a look. And I'm sure there are other programs that could do the same thing.



          Unfortunately, I don't know of any software that can look over all the pages in your PDF and decide for you which ones need to be transformed in some complex way, let alone rotated.



          EDIT: If your file was a native pdf that could be converted into postscript (.ps) format, I think it's possible there is a way to autorotate pages using ghostscript. However, to my knowledge, you can't do this with scanned pages, because the auto-rotate feature relies on interpretation of text direction, which can only come from a native pdf or ps document. I'm not completely sure...I will look into this a little more.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Apr 27 at 14:29

























          answered Apr 26 at 20:19









          Emily

          612317




          612317











          • Should actually be a fairly solvable problem. Text typically has a right margin, which is mostly straight, with few figures outside this.
            – vidarlo
            Apr 27 at 15:03










          • @vidarlo, that's a good point. Sadly, I don't know how to write that script myself :(. It makes me think, though, that it if the asker didn't mind exporting all the pages to individual files, s/he could easily use a preexisting GIMP script to autorotate each page, then merge the pages back into one single pdf with pdftk or even with GIMP's export as mng, then command line convert mng to pdf.
            – Emily
            Apr 27 at 15:37

















          • Should actually be a fairly solvable problem. Text typically has a right margin, which is mostly straight, with few figures outside this.
            – vidarlo
            Apr 27 at 15:03










          • @vidarlo, that's a good point. Sadly, I don't know how to write that script myself :(. It makes me think, though, that it if the asker didn't mind exporting all the pages to individual files, s/he could easily use a preexisting GIMP script to autorotate each page, then merge the pages back into one single pdf with pdftk or even with GIMP's export as mng, then command line convert mng to pdf.
            – Emily
            Apr 27 at 15:37
















          Should actually be a fairly solvable problem. Text typically has a right margin, which is mostly straight, with few figures outside this.
          – vidarlo
          Apr 27 at 15:03




          Should actually be a fairly solvable problem. Text typically has a right margin, which is mostly straight, with few figures outside this.
          – vidarlo
          Apr 27 at 15:03












          @vidarlo, that's a good point. Sadly, I don't know how to write that script myself :(. It makes me think, though, that it if the asker didn't mind exporting all the pages to individual files, s/he could easily use a preexisting GIMP script to autorotate each page, then merge the pages back into one single pdf with pdftk or even with GIMP's export as mng, then command line convert mng to pdf.
          – Emily
          Apr 27 at 15:37





          @vidarlo, that's a good point. Sadly, I don't know how to write that script myself :(. It makes me think, though, that it if the asker didn't mind exporting all the pages to individual files, s/he could easily use a preexisting GIMP script to autorotate each page, then merge the pages back into one single pdf with pdftk or even with GIMP's export as mng, then command line convert mng to pdf.
          – Emily
          Apr 27 at 15:37


















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1028507%2fskewed-scanned-pdf%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          pylint3 and pip3 broken

          Missing snmpget and snmpwalk

          How to enroll fingerprints to Ubuntu 17.10 with VFS491