mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-08 17:58:50 +01:00
🎨 导出 PDF 时支持将资源文件作为附件嵌入 https://github.com/siyuan-note/siyuan/issues/7414
This commit is contained in:
parent
c0c605b664
commit
f003aac384
6 changed files with 9 additions and 9 deletions
|
|
@ -311,7 +311,7 @@ func exportHTML(c *gin.Context) {
|
|||
}
|
||||
}
|
||||
|
||||
func addPDFOutline(c *gin.Context) {
|
||||
func processPDF(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
||||
|
|
@ -326,7 +326,7 @@ func addPDFOutline(c *gin.Context) {
|
|||
if nil != arg["merge"] {
|
||||
merge = arg["merge"].(bool)
|
||||
}
|
||||
err := model.AddPDFOutline(id, path, merge)
|
||||
err := model.ProcessPDF(id, path, merge)
|
||||
if nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
|
|
|
|||
|
|
@ -233,7 +233,7 @@ func ServeAPI(ginServer *gin.Engine) {
|
|||
ginServer.Handle("POST", "/api/export/exportPreviewHTML", model.CheckAuth, exportPreviewHTML)
|
||||
ginServer.Handle("POST", "/api/export/exportMdHTML", model.CheckAuth, exportMdHTML)
|
||||
ginServer.Handle("POST", "/api/export/exportDocx", model.CheckAuth, exportDocx)
|
||||
ginServer.Handle("POST", "/api/export/addPDFOutline", model.CheckAuth, addPDFOutline)
|
||||
ginServer.Handle("POST", "/api/export/processPDF", model.CheckAuth, processPDF)
|
||||
ginServer.Handle("POST", "/api/export/preview", model.CheckAuth, exportPreview)
|
||||
ginServer.Handle("POST", "/api/export/exportAsFile", model.CheckAuth, exportAsFile)
|
||||
ginServer.Handle("POST", "/api/export/exportData", model.CheckAuth, exportData)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue