How to convert cbr to pdf?












5















I have a comic strip book in cbr (Calibre?) format. How can I convert it to pdf in my Ubuntu 12.04? I tried to install calibre hoping that it is able to do so. But it seems to be buggy and does not show up. Appreciate your hints to do the conversion.










share|improve this question


















  • 1





    It's worth pointing out that the CBR (and CBZ) formats are not Calibre specific. They are "Comic Book Rar" and "Comic Book Zip" formats respectively.

    – Adam Ness
    May 23 '14 at 15:40
















5















I have a comic strip book in cbr (Calibre?) format. How can I convert it to pdf in my Ubuntu 12.04? I tried to install calibre hoping that it is able to do so. But it seems to be buggy and does not show up. Appreciate your hints to do the conversion.










share|improve this question


















  • 1





    It's worth pointing out that the CBR (and CBZ) formats are not Calibre specific. They are "Comic Book Rar" and "Comic Book Zip" formats respectively.

    – Adam Ness
    May 23 '14 at 15:40














5












5








5


1






I have a comic strip book in cbr (Calibre?) format. How can I convert it to pdf in my Ubuntu 12.04? I tried to install calibre hoping that it is able to do so. But it seems to be buggy and does not show up. Appreciate your hints to do the conversion.










share|improve this question














I have a comic strip book in cbr (Calibre?) format. How can I convert it to pdf in my Ubuntu 12.04? I tried to install calibre hoping that it is able to do so. But it seems to be buggy and does not show up. Appreciate your hints to do the conversion.







12.04 pdf calibre






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Oct 27 '12 at 13:48









wbadwbad

2213721




2213721








  • 1





    It's worth pointing out that the CBR (and CBZ) formats are not Calibre specific. They are "Comic Book Rar" and "Comic Book Zip" formats respectively.

    – Adam Ness
    May 23 '14 at 15:40














  • 1





    It's worth pointing out that the CBR (and CBZ) formats are not Calibre specific. They are "Comic Book Rar" and "Comic Book Zip" formats respectively.

    – Adam Ness
    May 23 '14 at 15:40








1




1





It's worth pointing out that the CBR (and CBZ) formats are not Calibre specific. They are "Comic Book Rar" and "Comic Book Zip" formats respectively.

– Adam Ness
May 23 '14 at 15:40





It's worth pointing out that the CBR (and CBZ) formats are not Calibre specific. They are "Comic Book Rar" and "Comic Book Zip" formats respectively.

– Adam Ness
May 23 '14 at 15:40










5 Answers
5






active

oldest

votes


















11














Found a nifty way to do this.
Programs that you might need are rar and imagemagick.



sudo apt-get update
sudo apt-get install rar imagemagick


Next, rename all the files extension that you want to convert, from *.cbr to *.rar.



Example: comic.cbr --> comic.rar



Next, use rar and extract all the .rar files. You should get .jpg files as output.



Next, use imagemagick to covert all into one. Make sure you are in that directory.



Example use in terminal:



convert *.jpg comic.pdf





share|improve this answer

































    4














    Just found another command line tools that works great
    http://sharedby.jauco.nl/cbr2pdf



    you can install in /usr/bin



    I requires some packages that you can install with




    sudo apt-get install pdftk sam2p unrar unzip




    Then just launch




    cbr2pdf [file.cbr]




    To have file.pdf on the same directoy






    share|improve this answer































      3














      I'm using ubuntu 12.04 and calibre did the job perfectly for me.
      Your problem is installing calibre. If I'm not wrong I managed to install it
      by upgrading python






      share|improve this answer































        1














        There is a script that should do cbr2pdf conversion, though I didn't try it. Link is: http://sourceforge.net/projects/cbr2pdf/






        share|improve this answer































          1














          Unfortunately convert and calibre changes the image quality/resolution, which is very important to CBR and CBZ, so to have no loss of quality, practically using the original jpg that is inside the CBR(CBZ) files you need to use img2pdf, I use this commands:



          First need to install this:



          sudo apt install img2pdf p7zip-full


          1) This to make a pdf file out of every jpg image without loss of either resolution or quality:



          ls -1 ./*jpg | xargs -L1 -I {} img2pdf {} -o {}.pdf


          2) This to concatenate the pdfpages into one:



          pdftk *.pdf cat output combined.pdf


          I made this batch files




          ./cbr2pdf.sh:



          #!/bin/bash
          set -xev
          ORIGINAL_FOLDER=`pwd`
          JPEGS=`mktemp -d`
          cp "$1" "$JPEGS"
          cd "$JPEGS"
          7z e "$1"
          ls -1 ./*jpg | xargs -L1 -I {} img2pdf {} -o {}.pdf
          pdftk *.pdf cat output combined.pdf
          cp "$JPEGS/combined.pdf" "$ORIGINAL_FOLDER/$1.pdf"


          cat cbz2pdf.sh



          #!/bin/bash
          #set -xev
          ORIGINAL_FOLDER=`pwd`
          JPEGS=`mktemp -d`
          unzip -j "$1" -d "$JPEGS"
          cd "$JPEGS"
          ls -1 ./*jpg | xargs -L1 -I {} img2pdf {} -o {}.pdf
          pdftk *.pdf cat output combined.pdf
          cp "$JPEGS/combined.pdf" "$ORIGINAL_FOLDER/$1.pdf"


          To convert all cbr and cbz in folder and subfolders:



          tree -fai . | grep -P "cbr$" | xargs -L1 -I{} ./cbr2pdf.sh {}


          and



          tree -fai . | grep -P "cbz$" | xargs -L1 -I{} ./cbz2pdf.sh {}





          share|improve this answer

























            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',
            autoActivateHeartbeat: false,
            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%2faskubuntu.com%2fquestions%2f207172%2fhow-to-convert-cbr-to-pdf%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            5 Answers
            5






            active

            oldest

            votes








            5 Answers
            5






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            11














            Found a nifty way to do this.
            Programs that you might need are rar and imagemagick.



            sudo apt-get update
            sudo apt-get install rar imagemagick


            Next, rename all the files extension that you want to convert, from *.cbr to *.rar.



            Example: comic.cbr --> comic.rar



            Next, use rar and extract all the .rar files. You should get .jpg files as output.



            Next, use imagemagick to covert all into one. Make sure you are in that directory.



            Example use in terminal:



            convert *.jpg comic.pdf





            share|improve this answer






























              11














              Found a nifty way to do this.
              Programs that you might need are rar and imagemagick.



              sudo apt-get update
              sudo apt-get install rar imagemagick


              Next, rename all the files extension that you want to convert, from *.cbr to *.rar.



              Example: comic.cbr --> comic.rar



              Next, use rar and extract all the .rar files. You should get .jpg files as output.



              Next, use imagemagick to covert all into one. Make sure you are in that directory.



              Example use in terminal:



              convert *.jpg comic.pdf





              share|improve this answer




























                11












                11








                11







                Found a nifty way to do this.
                Programs that you might need are rar and imagemagick.



                sudo apt-get update
                sudo apt-get install rar imagemagick


                Next, rename all the files extension that you want to convert, from *.cbr to *.rar.



                Example: comic.cbr --> comic.rar



                Next, use rar and extract all the .rar files. You should get .jpg files as output.



                Next, use imagemagick to covert all into one. Make sure you are in that directory.



                Example use in terminal:



                convert *.jpg comic.pdf





                share|improve this answer















                Found a nifty way to do this.
                Programs that you might need are rar and imagemagick.



                sudo apt-get update
                sudo apt-get install rar imagemagick


                Next, rename all the files extension that you want to convert, from *.cbr to *.rar.



                Example: comic.cbr --> comic.rar



                Next, use rar and extract all the .rar files. You should get .jpg files as output.



                Next, use imagemagick to covert all into one. Make sure you are in that directory.



                Example use in terminal:



                convert *.jpg comic.pdf






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Jun 25 '14 at 12:29









                Eric Carvalho

                42.3k17115147




                42.3k17115147










                answered Jun 25 '14 at 12:07









                AFwcxxAFwcxx

                3352511




                3352511

























                    4














                    Just found another command line tools that works great
                    http://sharedby.jauco.nl/cbr2pdf



                    you can install in /usr/bin



                    I requires some packages that you can install with




                    sudo apt-get install pdftk sam2p unrar unzip




                    Then just launch




                    cbr2pdf [file.cbr]




                    To have file.pdf on the same directoy






                    share|improve this answer




























                      4














                      Just found another command line tools that works great
                      http://sharedby.jauco.nl/cbr2pdf



                      you can install in /usr/bin



                      I requires some packages that you can install with




                      sudo apt-get install pdftk sam2p unrar unzip




                      Then just launch




                      cbr2pdf [file.cbr]




                      To have file.pdf on the same directoy






                      share|improve this answer


























                        4












                        4








                        4







                        Just found another command line tools that works great
                        http://sharedby.jauco.nl/cbr2pdf



                        you can install in /usr/bin



                        I requires some packages that you can install with




                        sudo apt-get install pdftk sam2p unrar unzip




                        Then just launch




                        cbr2pdf [file.cbr]




                        To have file.pdf on the same directoy






                        share|improve this answer













                        Just found another command line tools that works great
                        http://sharedby.jauco.nl/cbr2pdf



                        you can install in /usr/bin



                        I requires some packages that you can install with




                        sudo apt-get install pdftk sam2p unrar unzip




                        Then just launch




                        cbr2pdf [file.cbr]




                        To have file.pdf on the same directoy







                        share|improve this answer












                        share|improve this answer



                        share|improve this answer










                        answered Nov 21 '12 at 16:13









                        ElvisElvis

                        1713




                        1713























                            3














                            I'm using ubuntu 12.04 and calibre did the job perfectly for me.
                            Your problem is installing calibre. If I'm not wrong I managed to install it
                            by upgrading python






                            share|improve this answer




























                              3














                              I'm using ubuntu 12.04 and calibre did the job perfectly for me.
                              Your problem is installing calibre. If I'm not wrong I managed to install it
                              by upgrading python






                              share|improve this answer


























                                3












                                3








                                3







                                I'm using ubuntu 12.04 and calibre did the job perfectly for me.
                                Your problem is installing calibre. If I'm not wrong I managed to install it
                                by upgrading python






                                share|improve this answer













                                I'm using ubuntu 12.04 and calibre did the job perfectly for me.
                                Your problem is installing calibre. If I'm not wrong I managed to install it
                                by upgrading python







                                share|improve this answer












                                share|improve this answer



                                share|improve this answer










                                answered Nov 21 '12 at 15:42









                                ElvisElvis

                                1713




                                1713























                                    1














                                    There is a script that should do cbr2pdf conversion, though I didn't try it. Link is: http://sourceforge.net/projects/cbr2pdf/






                                    share|improve this answer




























                                      1














                                      There is a script that should do cbr2pdf conversion, though I didn't try it. Link is: http://sourceforge.net/projects/cbr2pdf/






                                      share|improve this answer


























                                        1












                                        1








                                        1







                                        There is a script that should do cbr2pdf conversion, though I didn't try it. Link is: http://sourceforge.net/projects/cbr2pdf/






                                        share|improve this answer













                                        There is a script that should do cbr2pdf conversion, though I didn't try it. Link is: http://sourceforge.net/projects/cbr2pdf/







                                        share|improve this answer












                                        share|improve this answer



                                        share|improve this answer










                                        answered Nov 21 '12 at 15:52









                                        Milan TodorovicMilan Todorovic

                                        8261515




                                        8261515























                                            1














                                            Unfortunately convert and calibre changes the image quality/resolution, which is very important to CBR and CBZ, so to have no loss of quality, practically using the original jpg that is inside the CBR(CBZ) files you need to use img2pdf, I use this commands:



                                            First need to install this:



                                            sudo apt install img2pdf p7zip-full


                                            1) This to make a pdf file out of every jpg image without loss of either resolution or quality:



                                            ls -1 ./*jpg | xargs -L1 -I {} img2pdf {} -o {}.pdf


                                            2) This to concatenate the pdfpages into one:



                                            pdftk *.pdf cat output combined.pdf


                                            I made this batch files




                                            ./cbr2pdf.sh:



                                            #!/bin/bash
                                            set -xev
                                            ORIGINAL_FOLDER=`pwd`
                                            JPEGS=`mktemp -d`
                                            cp "$1" "$JPEGS"
                                            cd "$JPEGS"
                                            7z e "$1"
                                            ls -1 ./*jpg | xargs -L1 -I {} img2pdf {} -o {}.pdf
                                            pdftk *.pdf cat output combined.pdf
                                            cp "$JPEGS/combined.pdf" "$ORIGINAL_FOLDER/$1.pdf"


                                            cat cbz2pdf.sh



                                            #!/bin/bash
                                            #set -xev
                                            ORIGINAL_FOLDER=`pwd`
                                            JPEGS=`mktemp -d`
                                            unzip -j "$1" -d "$JPEGS"
                                            cd "$JPEGS"
                                            ls -1 ./*jpg | xargs -L1 -I {} img2pdf {} -o {}.pdf
                                            pdftk *.pdf cat output combined.pdf
                                            cp "$JPEGS/combined.pdf" "$ORIGINAL_FOLDER/$1.pdf"


                                            To convert all cbr and cbz in folder and subfolders:



                                            tree -fai . | grep -P "cbr$" | xargs -L1 -I{} ./cbr2pdf.sh {}


                                            and



                                            tree -fai . | grep -P "cbz$" | xargs -L1 -I{} ./cbz2pdf.sh {}





                                            share|improve this answer






























                                              1














                                              Unfortunately convert and calibre changes the image quality/resolution, which is very important to CBR and CBZ, so to have no loss of quality, practically using the original jpg that is inside the CBR(CBZ) files you need to use img2pdf, I use this commands:



                                              First need to install this:



                                              sudo apt install img2pdf p7zip-full


                                              1) This to make a pdf file out of every jpg image without loss of either resolution or quality:



                                              ls -1 ./*jpg | xargs -L1 -I {} img2pdf {} -o {}.pdf


                                              2) This to concatenate the pdfpages into one:



                                              pdftk *.pdf cat output combined.pdf


                                              I made this batch files




                                              ./cbr2pdf.sh:



                                              #!/bin/bash
                                              set -xev
                                              ORIGINAL_FOLDER=`pwd`
                                              JPEGS=`mktemp -d`
                                              cp "$1" "$JPEGS"
                                              cd "$JPEGS"
                                              7z e "$1"
                                              ls -1 ./*jpg | xargs -L1 -I {} img2pdf {} -o {}.pdf
                                              pdftk *.pdf cat output combined.pdf
                                              cp "$JPEGS/combined.pdf" "$ORIGINAL_FOLDER/$1.pdf"


                                              cat cbz2pdf.sh



                                              #!/bin/bash
                                              #set -xev
                                              ORIGINAL_FOLDER=`pwd`
                                              JPEGS=`mktemp -d`
                                              unzip -j "$1" -d "$JPEGS"
                                              cd "$JPEGS"
                                              ls -1 ./*jpg | xargs -L1 -I {} img2pdf {} -o {}.pdf
                                              pdftk *.pdf cat output combined.pdf
                                              cp "$JPEGS/combined.pdf" "$ORIGINAL_FOLDER/$1.pdf"


                                              To convert all cbr and cbz in folder and subfolders:



                                              tree -fai . | grep -P "cbr$" | xargs -L1 -I{} ./cbr2pdf.sh {}


                                              and



                                              tree -fai . | grep -P "cbz$" | xargs -L1 -I{} ./cbz2pdf.sh {}





                                              share|improve this answer




























                                                1












                                                1








                                                1







                                                Unfortunately convert and calibre changes the image quality/resolution, which is very important to CBR and CBZ, so to have no loss of quality, practically using the original jpg that is inside the CBR(CBZ) files you need to use img2pdf, I use this commands:



                                                First need to install this:



                                                sudo apt install img2pdf p7zip-full


                                                1) This to make a pdf file out of every jpg image without loss of either resolution or quality:



                                                ls -1 ./*jpg | xargs -L1 -I {} img2pdf {} -o {}.pdf


                                                2) This to concatenate the pdfpages into one:



                                                pdftk *.pdf cat output combined.pdf


                                                I made this batch files




                                                ./cbr2pdf.sh:



                                                #!/bin/bash
                                                set -xev
                                                ORIGINAL_FOLDER=`pwd`
                                                JPEGS=`mktemp -d`
                                                cp "$1" "$JPEGS"
                                                cd "$JPEGS"
                                                7z e "$1"
                                                ls -1 ./*jpg | xargs -L1 -I {} img2pdf {} -o {}.pdf
                                                pdftk *.pdf cat output combined.pdf
                                                cp "$JPEGS/combined.pdf" "$ORIGINAL_FOLDER/$1.pdf"


                                                cat cbz2pdf.sh



                                                #!/bin/bash
                                                #set -xev
                                                ORIGINAL_FOLDER=`pwd`
                                                JPEGS=`mktemp -d`
                                                unzip -j "$1" -d "$JPEGS"
                                                cd "$JPEGS"
                                                ls -1 ./*jpg | xargs -L1 -I {} img2pdf {} -o {}.pdf
                                                pdftk *.pdf cat output combined.pdf
                                                cp "$JPEGS/combined.pdf" "$ORIGINAL_FOLDER/$1.pdf"


                                                To convert all cbr and cbz in folder and subfolders:



                                                tree -fai . | grep -P "cbr$" | xargs -L1 -I{} ./cbr2pdf.sh {}


                                                and



                                                tree -fai . | grep -P "cbz$" | xargs -L1 -I{} ./cbz2pdf.sh {}





                                                share|improve this answer















                                                Unfortunately convert and calibre changes the image quality/resolution, which is very important to CBR and CBZ, so to have no loss of quality, practically using the original jpg that is inside the CBR(CBZ) files you need to use img2pdf, I use this commands:



                                                First need to install this:



                                                sudo apt install img2pdf p7zip-full


                                                1) This to make a pdf file out of every jpg image without loss of either resolution or quality:



                                                ls -1 ./*jpg | xargs -L1 -I {} img2pdf {} -o {}.pdf


                                                2) This to concatenate the pdfpages into one:



                                                pdftk *.pdf cat output combined.pdf


                                                I made this batch files




                                                ./cbr2pdf.sh:



                                                #!/bin/bash
                                                set -xev
                                                ORIGINAL_FOLDER=`pwd`
                                                JPEGS=`mktemp -d`
                                                cp "$1" "$JPEGS"
                                                cd "$JPEGS"
                                                7z e "$1"
                                                ls -1 ./*jpg | xargs -L1 -I {} img2pdf {} -o {}.pdf
                                                pdftk *.pdf cat output combined.pdf
                                                cp "$JPEGS/combined.pdf" "$ORIGINAL_FOLDER/$1.pdf"


                                                cat cbz2pdf.sh



                                                #!/bin/bash
                                                #set -xev
                                                ORIGINAL_FOLDER=`pwd`
                                                JPEGS=`mktemp -d`
                                                unzip -j "$1" -d "$JPEGS"
                                                cd "$JPEGS"
                                                ls -1 ./*jpg | xargs -L1 -I {} img2pdf {} -o {}.pdf
                                                pdftk *.pdf cat output combined.pdf
                                                cp "$JPEGS/combined.pdf" "$ORIGINAL_FOLDER/$1.pdf"


                                                To convert all cbr and cbz in folder and subfolders:



                                                tree -fai . | grep -P "cbr$" | xargs -L1 -I{} ./cbr2pdf.sh {}


                                                and



                                                tree -fai . | grep -P "cbz$" | xargs -L1 -I{} ./cbz2pdf.sh {}






                                                share|improve this answer














                                                share|improve this answer



                                                share|improve this answer








                                                edited Feb 5 at 9:30

























                                                answered Feb 13 '18 at 3:33









                                                Eduard FlorinescuEduard Florinescu

                                                2,28283042




                                                2,28283042






























                                                    draft saved

                                                    draft discarded




















































                                                    Thanks for contributing an answer to Ask Ubuntu!


                                                    • 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%2faskubuntu.com%2fquestions%2f207172%2fhow-to-convert-cbr-to-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

                                                    Questions related to Moebius Transform of Characteristic Function of the Primes

                                                    List of scandals in India

                                                    Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?