mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 00:20:12 +01:00
🎨 支持合并子文档导出 Word/PDF https://github.com/siyuan-note/siyuan/issues/3219
This commit is contained in:
parent
d619948544
commit
e71c120a97
7 changed files with 12 additions and 8 deletions
|
|
@ -459,7 +459,7 @@
|
||||||
"newNameFile": "The name of the new document is",
|
"newNameFile": "The name of the new document is",
|
||||||
"newContentFile": "The content of the new document is",
|
"newContentFile": "The content of the new document is",
|
||||||
"exporting": "Exporting, please wait...",
|
"exporting": "Exporting, please wait...",
|
||||||
"exported": "Export complete: ",
|
"exported": "Export complete",
|
||||||
"refExpired": "Search content block does not exist",
|
"refExpired": "Search content block does not exist",
|
||||||
"emptyContent": "No related content",
|
"emptyContent": "No related content",
|
||||||
"useBrowserView": "View in the browser",
|
"useBrowserView": "View in the browser",
|
||||||
|
|
|
||||||
|
|
@ -458,7 +458,7 @@
|
||||||
"newNameFile": "El nombre del nuevo documento es",
|
"newNameFile": "El nombre del nuevo documento es",
|
||||||
"newContentFile": "El contenido del nuevo documento es",
|
"newContentFile": "El contenido del nuevo documento es",
|
||||||
"exporting": "Exportando, por favor espere...",
|
"exporting": "Exportando, por favor espere...",
|
||||||
"exported": "Exportación completada: ",
|
"exported": "Exportación completada",
|
||||||
"refExpired": "El bloque de contenido de búsqueda no existe",
|
"refExpired": "El bloque de contenido de búsqueda no existe",
|
||||||
"emptyContent": "No hay contenido relacionado",
|
"emptyContent": "No hay contenido relacionado",
|
||||||
"useBrowserView": "Ver en el navegador",
|
"useBrowserView": "Ver en el navegador",
|
||||||
|
|
|
||||||
|
|
@ -459,7 +459,7 @@
|
||||||
"newNameFile": "Le nom du nouveau document est",
|
"newNameFile": "Le nom du nouveau document est",
|
||||||
"newContentFile": "Le contenu du nouveau document est",
|
"newContentFile": "Le contenu du nouveau document est",
|
||||||
"exporting": "En cours d'exportation, veuillez patienter...",
|
"exporting": "En cours d'exportation, veuillez patienter...",
|
||||||
"exported": "Exportation terminée: ",
|
"exported": "Exportation terminée",
|
||||||
"refExpired": "Le bloc de contenu de recherche n'existe pas",
|
"refExpired": "Le bloc de contenu de recherche n'existe pas",
|
||||||
"emptyContent": "Aucun contenu pertinent pour le moment",
|
"emptyContent": "Aucun contenu pertinent pour le moment",
|
||||||
"useBrowserView": "Afficher dans le navigateur",
|
"useBrowserView": "Afficher dans le navigateur",
|
||||||
|
|
|
||||||
|
|
@ -459,7 +459,7 @@
|
||||||
"newNameFile": "新建文檔名為",
|
"newNameFile": "新建文檔名為",
|
||||||
"newContentFile": "新建文檔內容為",
|
"newContentFile": "新建文檔內容為",
|
||||||
"exporting": "正在匯出,請稍等...",
|
"exporting": "正在匯出,請稍等...",
|
||||||
"exported": "匯出完成:",
|
"exported": "匯出完成",
|
||||||
"refExpired": "不存在符合條件的內容塊",
|
"refExpired": "不存在符合條件的內容塊",
|
||||||
"emptyContent": "暫無相關內容",
|
"emptyContent": "暫無相關內容",
|
||||||
"useBrowserView": "在瀏覽器中查看",
|
"useBrowserView": "在瀏覽器中查看",
|
||||||
|
|
|
||||||
|
|
@ -459,7 +459,7 @@
|
||||||
"newNameFile": "新建文档名为",
|
"newNameFile": "新建文档名为",
|
||||||
"newContentFile": "新建文档内容为",
|
"newContentFile": "新建文档内容为",
|
||||||
"exporting": "正在导出,请稍等...",
|
"exporting": "正在导出,请稍等...",
|
||||||
"exported": "导出完成:",
|
"exported": "导出完成",
|
||||||
"refExpired": "不存在符合条件的内容块",
|
"refExpired": "不存在符合条件的内容块",
|
||||||
"emptyContent": "暂无相关内容",
|
"emptyContent": "暂无相关内容",
|
||||||
"useBrowserView": "在浏览器中查看",
|
"useBrowserView": "在浏览器中查看",
|
||||||
|
|
|
||||||
|
|
@ -504,8 +504,12 @@ func AddPDFOutline(id, p string) (err error) {
|
||||||
footnotes := map[string]*pdfcpu.Bookmark{}
|
footnotes := map[string]*pdfcpu.Bookmark{}
|
||||||
for _, link := range links {
|
for _, link := range links {
|
||||||
linkID := link.URI[strings.LastIndex(link.URI, "/")+1:]
|
linkID := link.URI[strings.LastIndex(link.URI, "/")+1:]
|
||||||
|
b := sql.GetBlock(linkID)
|
||||||
title := sql.GetBlock(linkID).Content
|
if nil == b {
|
||||||
|
logging.LogWarnf("pdf outline block [%s] not found", linkID)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
title := b.Content
|
||||||
title, _ = url.QueryUnescape(title)
|
title, _ = url.QueryUnescape(title)
|
||||||
bm := &pdfcpu.Bookmark{
|
bm := &pdfcpu.Bookmark{
|
||||||
Title: title,
|
Title: title,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue