From 81a3a5b32d482aae7401724a3daf335e58252829 Mon Sep 17 00:00:00 2001 From: FunCoder Date: Tue, 17 Dec 2024 14:30:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E5=B8=83pdf=E6=97=B6=E5=80=99?= =?UTF-8?q?=E7=9A=84=E9=BB=98=E8=AE=A4=E5=8F=91=E5=B8=83=E8=80=85=EF=BC=88?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=A1=AB=E5=86=99=E4=BA=86=E5=85=AC=E5=8F=B8?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E4=BB=A5=E5=85=AC=E5=8F=B8=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E4=B8=BA=E5=87=86=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conf/app.conf.example | 2 ++ models/BookResult.go | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/conf/app.conf.example b/conf/app.conf.example index 94892c84..3a65aa6f 100644 --- a/conf/app.conf.example +++ b/conf/app.conf.example @@ -22,6 +22,8 @@ highlight_style="${MINDOC_HIGHLIGHT_STYLE||github}" #大于0时系统会自动检测配置文件是否变动,变动后自动加载并生效,单位是秒。监听端口和数据库配置无效 config_auto_delay="${MINDOC_CONFIG_AUTO_DELAY||20}" +#发布pdf时候的默认发布者(项目填写了公司名称以公司名称为准) +publisher_def = ########Session储存方式############## diff --git a/models/BookResult.go b/models/BookResult.go index de2ada58..6663f9f7 100644 --- a/models/BookResult.go +++ b/models/BookResult.go @@ -373,8 +373,12 @@ func (m *BookResult) Converter(sessionId string) (ConvertBookResult, error) { Toc: tocList, More: []string{}, } + if m.Publisher != "" { ebookConfig.Footer = "

本文档由 " + m.Publisher + " 生成- _PAGENUM_ -

" + } else if web.AppConfig.DefaultString("publisher_def", "") != "" { + defPub := web.AppConfig.DefaultString("publisher_def", "") + ebookConfig.Footer = "

本文档由 " + defPub + " 生成- _PAGENUM_ -

" } if m.RealName != "" { ebookConfig.Creator = m.RealName