mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-11-24 08:47:04 +08:00
优化页眉的显示
This commit is contained in:
@@ -476,12 +476,12 @@ func (this *Converter) convertToPdf() (err error) {
|
||||
|
||||
//header template
|
||||
if len(this.Config.Header) > 0 {
|
||||
args = append(args, "--pdf-header-template", this.Config.Header)
|
||||
args = append(args, "--pdf-header-template", GetFooterOrHeaderParams(this.Config.Header))
|
||||
}
|
||||
|
||||
//footer template
|
||||
if len(this.Config.Footer) > 0 {
|
||||
args = append(args, "--pdf-footer-template", this.Config.Footer)
|
||||
args = append(args, "--pdf-footer-template",GetFooterOrHeaderParams(this.Config.Footer))
|
||||
}
|
||||
|
||||
if len(this.Config.MarginLeft) > 0 {
|
||||
|
||||
@@ -45,3 +45,7 @@ func parseConfig(configFile string) (cfg Config, err error) {
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func GetFooterOrHeaderParams(v string) string {
|
||||
return v
|
||||
}
|
||||
5
converter/util_linux.go
Normal file
5
converter/util_linux.go
Normal file
@@ -0,0 +1,5 @@
|
||||
package converter
|
||||
|
||||
func GetFooterOrHeaderParams(v string) string {
|
||||
return "\"" + v +"\""
|
||||
}
|
||||
Reference in New Issue
Block a user