TruthHun / BookStack

BookStack,基于MinDoc,使用Beego开发的在线文档管理系统,功能类似Gitbook和看云。
http://www.bookstack.cn
Apache License 2.0
3.42k stars 805 forks source link

ebook-convert遇到单引号失败 #156

Open shuinoo opened 2 years ago

shuinoo commented 2 years ago

请按照一下格式提交issue,谢谢!

  1. 你当前使用的是哪个版本的 BookStack?

2.10

  1. 你当前使用的是什么操作系统?

ubuntu 21.04

  1. 你是如何操作的?

image

  1. 你期望得到什么结果?

生成正确的pdf文档

  1. 当前遇到的是什么结果? [ebook-convert /www/bookstack/cache/books/test/content.epub /www/bookstack/cache/books/test/output/book.pdf --paper-size a4 --pdf-default-font-size 13 --pdf-header-template

    SECTION --pdf-footer-template

    本文档使用 书栈(BookStack.CN) 构建 - PAGENUM -

    --pdf-page-margin-bottom 36 --pdf-page-margin-left 36 --pdf-page-margin-right 36 --pdf-page-margin-top 36] 2022/09/15 17:36:34.588 [E] [document.go:484] exit status 1

  2. 手动执行 sunisco@ubuntu:~$ ebook-convert /www/bookstack/cache/books/test/content.epub /www/bookstack/cache/books/test/output/book.pdf --paper-size a4 --pdf-default-font-size 13 --pdf-header-template

    SECTION --pdf-footer-template

    本文档使用 书栈(BookStack.CN) 构建 - PAGENUM -

    --pdf-page-margin-bottom 36 --pdf-page-margin-left 36 --pdf-page-margin-right 36 --pdf-page-margin-top 36 -bash: syntax error near unexpected token `('

  3. 加入引号执行结果如下: sunisco@ubuntu:~$ ebook-convert /www/bookstack/cache/books/test/content.epub /www/bookstack/cache/books/test/output/book.pdf --paper-size a4 --pdf-default-font-size 13 --pdf-header-template "

    SECTION" --pdf-footer-template "

    本文档使用 书栈(BookStack.CN) 构建 - PAGENUM -

    " --pdf-page-margin-bottom 36 --pdf-page-margin-left 36 --pdf-page-margin-right 36 --pdf-page-margin-top 36 Conversion options changed from defaults: pdf_footer_template: "

    本文档使用 书栈(BookStack.CN) 构建 - PAGENUM -

    " paper_size: 'a4' pdf_default_font_size: 13.0 pdf_header_template: "

    SECTION

    " pdf_page_margin_left: 36.0 pdf_page_margin_bottom: 36.0 pdf_page_margin_top: 36.0 pdf_page_margin_right: 36.0 1% Converting input to HTML... qt.webenginecontext:

GL Type: disabled Surface Type: DefaultRenderableType Surface Profile: NoProfile Surface Version: 2.0 QSG RHI Backend: OpenGL Using Supported QSG Backend: yes Using Software Dynamic GL: no Using Multithreaded OpenGL: no

Init Parameters:

InputFormatPlugin: EPUB Input running on /www/bookstack/cache/books/test/content.epub Found HTML cover titlepage.xhtml Parsing all content... Referenced file 'www/bookstack/cache/books/fonts/fontawesome-webfont.ttf%3fv%3d4.3.0' not found Referenced file 'www/bookstack/cache/books/fonts/fontawesome-webfont.eot' not found Referenced file 'www/bookstack/cache/books/fonts/editormd-logo.ttf%3f-5y8q6h' not found Referenced file 'www/bookstack/cache/books/fonts/editormd-logo.svg%3f-5y8q6h' not found Referenced file 'www/bookstack/cache/books/fonts/fontawesome-webfont.eot%3fv%3d4.3.0' not found Referenced file 'www/bookstack/cache/books/fonts/fontawesome-webfont.woff%3fv%3d4.3.0' not found Referenced file 'www/bookstack/cache/books/fonts/fontawesome-webfont.svg%3fv%3d4.3.0' not found Referenced file 'www/bookstack/cache/books/fonts/editormd-logo.woff%3f-5y8q6h' not found Referenced file 'www/bookstack/cache/books/test/.../fonts/editormd-logo.eot' not found Referenced file 'www/bookstack/cache/books/fonts/fontawesome-webfont.woff2%3fv%3d4.3.0' not found Referenced file 'www/bookstack/cache/books/fonts/editormd-logo.eot%3f-5y8q6h' not found 34% Running transforms on e-book... Merging user specified metadata... Detecting structure... Flattening CSS and remapping font sizes... Source base font size is 11.99997pt Removing fake margins... Cleaning up manifest... Trimming unused files from manifest... Creating PDF Output... 67% Running PDF Output plugin 68% Parsed all content for markup transformation 70% Completed markup transformation No suitable graphics backend found

90% Rendered all HTML as PDF 91% Added links to PDF content 93% Adding headers and footers 96% Headers and footers added Removed 1 unused fonts Merged 8 instances of WenQuanYiZenHei reducing size from 743 KB to 149.3 KB Merged 4 instances of DejaVuSans-Bold reducing size from 10.4 KB to 5.6 KB Merged 2 instances of WenQuanYiMicroHei reducing size from 485.5 KB to 302.1 KB Merged 6 instances of DejaVuSans reducing size from 15.9 KB to 8.7 KB 100% Updated metadata in PDF PDF output written to /www/bookstack/cache/books/test/output/book.pdf Output saved to /www/bookstack/cache/books/test/output/book.pdf