Converting EPUB to PDF using Pandoc












2















I want to convert my test.epub to PDF format using Pandoc. I tried (given here)



pandoc -f epub -t test.epub -o outfile.pdf


which throws the following error:




cannot produce pdf output from pdf




I also tried the following command



pandoc test.epub -f epub -t latex -s -o my.pdf --latex-engine=xelatex


which throws the following error:



--latex-engine has been removed.  Use --pdf-engine instead.
Try pandoc --help for more information.


Then I tried



pandoc test.epub -f epub -t latex -s -o my.pdf --pdf-engine=xelatex


which converts the EPUB to PDF format but the final output is not very good. No respect for page break and other stuff. More number of pages than the actual. Any thoughts to convert EPUB to PDF format very efficiently.










share|improve this question

























  • What is your pandoc --version? They have newer deb-packaged versions.

    – N0rbert
    Apr 29 '18 at 10:39













  • Thanks @N0rbert for your comment. Tried pandoc test.epub -o my.pdf which throws the following error: Error producing PDF. ! Package inputenc Error: Unicode char в (U+432) (inputenc) not set up for use with LaTeX. See the inputenc package documentation for explanation. Type H <return> for immediate help. ... l.3160 said with a clear voice, ``{в Try running pandoc with --pdf-engine=xelatex.

    – MYaseen208
    Apr 29 '18 at 10:42











  • I think it depends on input epub-file. Where you got yours?

    – N0rbert
    Apr 29 '18 at 10:45













  • Thanks @N0rbert for your interest in my problem. I can email you epub document if you want to producing the problem. Thanks

    – MYaseen208
    Apr 29 '18 at 10:49











  • You can start with simple document from bookdown.org/yihui/bookdown-demo/bookdown-demo.epub , it converts normally. If you are the author of epub, you can produce many output formats from RMarkdown (bookdown).

    – N0rbert
    Apr 29 '18 at 11:00


















2















I want to convert my test.epub to PDF format using Pandoc. I tried (given here)



pandoc -f epub -t test.epub -o outfile.pdf


which throws the following error:




cannot produce pdf output from pdf




I also tried the following command



pandoc test.epub -f epub -t latex -s -o my.pdf --latex-engine=xelatex


which throws the following error:



--latex-engine has been removed.  Use --pdf-engine instead.
Try pandoc --help for more information.


Then I tried



pandoc test.epub -f epub -t latex -s -o my.pdf --pdf-engine=xelatex


which converts the EPUB to PDF format but the final output is not very good. No respect for page break and other stuff. More number of pages than the actual. Any thoughts to convert EPUB to PDF format very efficiently.










share|improve this question

























  • What is your pandoc --version? They have newer deb-packaged versions.

    – N0rbert
    Apr 29 '18 at 10:39













  • Thanks @N0rbert for your comment. Tried pandoc test.epub -o my.pdf which throws the following error: Error producing PDF. ! Package inputenc Error: Unicode char в (U+432) (inputenc) not set up for use with LaTeX. See the inputenc package documentation for explanation. Type H <return> for immediate help. ... l.3160 said with a clear voice, ``{в Try running pandoc with --pdf-engine=xelatex.

    – MYaseen208
    Apr 29 '18 at 10:42











  • I think it depends on input epub-file. Where you got yours?

    – N0rbert
    Apr 29 '18 at 10:45













  • Thanks @N0rbert for your interest in my problem. I can email you epub document if you want to producing the problem. Thanks

    – MYaseen208
    Apr 29 '18 at 10:49











  • You can start with simple document from bookdown.org/yihui/bookdown-demo/bookdown-demo.epub , it converts normally. If you are the author of epub, you can produce many output formats from RMarkdown (bookdown).

    – N0rbert
    Apr 29 '18 at 11:00
















2












2








2


1






I want to convert my test.epub to PDF format using Pandoc. I tried (given here)



pandoc -f epub -t test.epub -o outfile.pdf


which throws the following error:




cannot produce pdf output from pdf




I also tried the following command



pandoc test.epub -f epub -t latex -s -o my.pdf --latex-engine=xelatex


which throws the following error:



--latex-engine has been removed.  Use --pdf-engine instead.
Try pandoc --help for more information.


Then I tried



pandoc test.epub -f epub -t latex -s -o my.pdf --pdf-engine=xelatex


which converts the EPUB to PDF format but the final output is not very good. No respect for page break and other stuff. More number of pages than the actual. Any thoughts to convert EPUB to PDF format very efficiently.










share|improve this question
















I want to convert my test.epub to PDF format using Pandoc. I tried (given here)



pandoc -f epub -t test.epub -o outfile.pdf


which throws the following error:




cannot produce pdf output from pdf




I also tried the following command



pandoc test.epub -f epub -t latex -s -o my.pdf --latex-engine=xelatex


which throws the following error:



--latex-engine has been removed.  Use --pdf-engine instead.
Try pandoc --help for more information.


Then I tried



pandoc test.epub -f epub -t latex -s -o my.pdf --pdf-engine=xelatex


which converts the EPUB to PDF format but the final output is not very good. No respect for page break and other stuff. More number of pages than the actual. Any thoughts to convert EPUB to PDF format very efficiently.







pdf latex convert epub pandoc






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 15 '18 at 3:22









Kurt Pfeifle

1,090711




1,090711










asked Apr 29 '18 at 10:34









MYaseen208MYaseen208

26831028




26831028













  • What is your pandoc --version? They have newer deb-packaged versions.

    – N0rbert
    Apr 29 '18 at 10:39













  • Thanks @N0rbert for your comment. Tried pandoc test.epub -o my.pdf which throws the following error: Error producing PDF. ! Package inputenc Error: Unicode char в (U+432) (inputenc) not set up for use with LaTeX. See the inputenc package documentation for explanation. Type H <return> for immediate help. ... l.3160 said with a clear voice, ``{в Try running pandoc with --pdf-engine=xelatex.

    – MYaseen208
    Apr 29 '18 at 10:42











  • I think it depends on input epub-file. Where you got yours?

    – N0rbert
    Apr 29 '18 at 10:45













  • Thanks @N0rbert for your interest in my problem. I can email you epub document if you want to producing the problem. Thanks

    – MYaseen208
    Apr 29 '18 at 10:49











  • You can start with simple document from bookdown.org/yihui/bookdown-demo/bookdown-demo.epub , it converts normally. If you are the author of epub, you can produce many output formats from RMarkdown (bookdown).

    – N0rbert
    Apr 29 '18 at 11:00





















  • What is your pandoc --version? They have newer deb-packaged versions.

    – N0rbert
    Apr 29 '18 at 10:39













  • Thanks @N0rbert for your comment. Tried pandoc test.epub -o my.pdf which throws the following error: Error producing PDF. ! Package inputenc Error: Unicode char в (U+432) (inputenc) not set up for use with LaTeX. See the inputenc package documentation for explanation. Type H <return> for immediate help. ... l.3160 said with a clear voice, ``{в Try running pandoc with --pdf-engine=xelatex.

    – MYaseen208
    Apr 29 '18 at 10:42











  • I think it depends on input epub-file. Where you got yours?

    – N0rbert
    Apr 29 '18 at 10:45













  • Thanks @N0rbert for your interest in my problem. I can email you epub document if you want to producing the problem. Thanks

    – MYaseen208
    Apr 29 '18 at 10:49











  • You can start with simple document from bookdown.org/yihui/bookdown-demo/bookdown-demo.epub , it converts normally. If you are the author of epub, you can produce many output formats from RMarkdown (bookdown).

    – N0rbert
    Apr 29 '18 at 11:00



















What is your pandoc --version? They have newer deb-packaged versions.

– N0rbert
Apr 29 '18 at 10:39







What is your pandoc --version? They have newer deb-packaged versions.

– N0rbert
Apr 29 '18 at 10:39















Thanks @N0rbert for your comment. Tried pandoc test.epub -o my.pdf which throws the following error: Error producing PDF. ! Package inputenc Error: Unicode char в (U+432) (inputenc) not set up for use with LaTeX. See the inputenc package documentation for explanation. Type H <return> for immediate help. ... l.3160 said with a clear voice, ``{в Try running pandoc with --pdf-engine=xelatex.

– MYaseen208
Apr 29 '18 at 10:42





Thanks @N0rbert for your comment. Tried pandoc test.epub -o my.pdf which throws the following error: Error producing PDF. ! Package inputenc Error: Unicode char в (U+432) (inputenc) not set up for use with LaTeX. See the inputenc package documentation for explanation. Type H <return> for immediate help. ... l.3160 said with a clear voice, ``{в Try running pandoc with --pdf-engine=xelatex.

– MYaseen208
Apr 29 '18 at 10:42













I think it depends on input epub-file. Where you got yours?

– N0rbert
Apr 29 '18 at 10:45







I think it depends on input epub-file. Where you got yours?

– N0rbert
Apr 29 '18 at 10:45















Thanks @N0rbert for your interest in my problem. I can email you epub document if you want to producing the problem. Thanks

– MYaseen208
Apr 29 '18 at 10:49





Thanks @N0rbert for your interest in my problem. I can email you epub document if you want to producing the problem. Thanks

– MYaseen208
Apr 29 '18 at 10:49













You can start with simple document from bookdown.org/yihui/bookdown-demo/bookdown-demo.epub , it converts normally. If you are the author of epub, you can produce many output formats from RMarkdown (bookdown).

– N0rbert
Apr 29 '18 at 11:00







You can start with simple document from bookdown.org/yihui/bookdown-demo/bookdown-demo.epub , it converts normally. If you are the author of epub, you can produce many output formats from RMarkdown (bookdown).

– N0rbert
Apr 29 '18 at 11:00












1 Answer
1






active

oldest

votes


















0














Have you tried the latest version of Pandoc, which currently is v2.5?

Have you tried to play with '--epub-chapter-level=...' numbers?

Have you tried to play with '--top-level-division=section' (or ...=part or ...=chapter) for the output?

Have you tried with the LuaLaTeX engine`?




pandoc
-f epub
-t latex
-o my.pdf
--epub-chapter-level=1
--pdf-engine=lualatex
test.epub




Have you tried a non-Pandoc tool like Calibre?






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%2f1029631%2fconverting-epub-to-pdf-using-pandoc%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














    Have you tried the latest version of Pandoc, which currently is v2.5?

    Have you tried to play with '--epub-chapter-level=...' numbers?

    Have you tried to play with '--top-level-division=section' (or ...=part or ...=chapter) for the output?

    Have you tried with the LuaLaTeX engine`?




    pandoc
    -f epub
    -t latex
    -o my.pdf
    --epub-chapter-level=1
    --pdf-engine=lualatex
    test.epub




    Have you tried a non-Pandoc tool like Calibre?






    share|improve this answer






























      0














      Have you tried the latest version of Pandoc, which currently is v2.5?

      Have you tried to play with '--epub-chapter-level=...' numbers?

      Have you tried to play with '--top-level-division=section' (or ...=part or ...=chapter) for the output?

      Have you tried with the LuaLaTeX engine`?




      pandoc
      -f epub
      -t latex
      -o my.pdf
      --epub-chapter-level=1
      --pdf-engine=lualatex
      test.epub




      Have you tried a non-Pandoc tool like Calibre?






      share|improve this answer




























        0












        0








        0







        Have you tried the latest version of Pandoc, which currently is v2.5?

        Have you tried to play with '--epub-chapter-level=...' numbers?

        Have you tried to play with '--top-level-division=section' (or ...=part or ...=chapter) for the output?

        Have you tried with the LuaLaTeX engine`?




        pandoc
        -f epub
        -t latex
        -o my.pdf
        --epub-chapter-level=1
        --pdf-engine=lualatex
        test.epub




        Have you tried a non-Pandoc tool like Calibre?






        share|improve this answer















        Have you tried the latest version of Pandoc, which currently is v2.5?

        Have you tried to play with '--epub-chapter-level=...' numbers?

        Have you tried to play with '--top-level-division=section' (or ...=part or ...=chapter) for the output?

        Have you tried with the LuaLaTeX engine`?




        pandoc
        -f epub
        -t latex
        -o my.pdf
        --epub-chapter-level=1
        --pdf-engine=lualatex
        test.epub




        Have you tried a non-Pandoc tool like Calibre?







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Dec 15 '18 at 9:46

























        answered Dec 15 '18 at 1:48









        Kurt PfeifleKurt Pfeifle

        1,090711




        1,090711






























            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%2f1029631%2fconverting-epub-to-pdf-using-pandoc%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

            Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

            ComboBox Display Member on multiple fields

            Is it possible to collect Nectar points via Trainline?