发布pdf时候的默认发布者(项目填写了公司名称以公司名称为准)

This commit is contained in:
FunCoder 2024-12-17 14:30:33 +08:00
parent 483b88a7e8
commit 81a3a5b32d
2 changed files with 6 additions and 0 deletions

View File

@ -22,6 +22,8 @@ highlight_style="${MINDOC_HIGHLIGHT_STYLE||github}"
#大于0时系统会自动检测配置文件是否变动变动后自动加载并生效,单位是秒。监听端口和数据库配置无效
config_auto_delay="${MINDOC_CONFIG_AUTO_DELAY||20}"
#发布pdf时候的默认发布者项目填写了公司名称以公司名称为准
publisher_def =
########Session储存方式##############

View File

@ -373,8 +373,12 @@ func (m *BookResult) Converter(sessionId string) (ConvertBookResult, error) {
Toc: tocList,
More: []string{},
}
if m.Publisher != "" {
ebookConfig.Footer = "<p style='color:#8E8E8E;font-size:12px;'>本文档由 <span style='text-decoration:none;color:#1abc9c;font-weight:bold;'>" + m.Publisher + "</span> 生成<span style='float:right'>- _PAGENUM_ -</span></p>"
} else if web.AppConfig.DefaultString("publisher_def", "") != "" {
defPub := web.AppConfig.DefaultString("publisher_def", "")
ebookConfig.Footer = "<p style='color:#8E8E8E;font-size:12px;'>本文档由 <span style='text-decoration:none;color:#1abc9c;font-weight:bold;'>" + defPub + "</span> 生成<span style='float:right'>- _PAGENUM_ -</span></p>"
}
if m.RealName != "" {
ebookConfig.Creator = m.RealName