修复导出PDF的BUG

This commit is contained in:
Minho
2018-01-29 16:22:39 +08:00
parent 7a90148507
commit 0820397f10
3 changed files with 10 additions and 7 deletions

View File

@@ -199,7 +199,7 @@ func (m *BookResult) Converter(sessionId string) (ConvertBookResult, error) {
defer func(p string) {
os.RemoveAll(p)
}(tempOutputPath)
if utils.FileExists(pdfpath) && utils.FileExists(epubpath) && utils.FileExists(mobipath) && utils.FileExists(docxpath) {
convertBookResult.EpubPath = epubpath
convertBookResult.MobiPath = mobipath
@@ -245,8 +245,8 @@ func (m *BookResult) Converter(sessionId string) (ConvertBookResult, error) {
Cover: m.Cover,
Timestamp: time.Now().Format("2006-01-02 15:04:05"),
Description: string(blackfriday.MarkdownBasic([]byte(m.Description))),
Footer: "<p style='color:#8E8E8E;font-size:12px;'>本文档使用 <a href='https://www.iminho.me' style='text-decoration:none;color:#1abc9c;font-weight:bold;'>MinDoc</a> 构建 <span style='float:right'>- _PAGENUM_ -</span></p>",
Header: "<p style='color:#8E8E8E;font-size:12px;'>_SECTION_</p>",
Footer: "\"<p style='color:#8E8E8E;font-size:12px;'>本文档使用 <a href='https://www.iminho.me' style='text-decoration:none;color:#1abc9c;font-weight:bold;'>MinDoc</a> 构建 <span style='float:right'>- _PAGENUM_ -</span></p>\"",
Header: "\"<p style='color:#8E8E8E;font-size:12px;'>_SECTION_</p>\"",
Identifier: "",
Language: "zh-CN",
Creator: m.CreateName,