🎨 导出 PDF 时支持将资源文件作为附件嵌入 Fix https://github.com/siyuan-note/siyuan/issues/7414

This commit is contained in:
Liang Ding 2023-02-24 10:21:46 +08:00
parent 27ac32d807
commit 85c9195e08
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
3 changed files with 4 additions and 2 deletions

View file

@ -816,7 +816,7 @@ func processPDFLinkEmbedAssets(pdfCtx *pdfcpu.Context, assetDests []string, remo
attachmentMap := map[int][]*pdfcpu.IndirectRef{}
now := pdfcpu.StringLiteral(pdfcpu.DateString(time.Now()))
for _, link := range assetLinks {
link.URI = strings.ReplaceAll(link.URI, "http://127.0.0.1:6806/export/temp/", "")
link.URI = strings.ReplaceAll(link.URI, "http://"+util.LocalHost+":"+util.ServerPort+"/export/temp/", "")
link.URI, _ = url.PathUnescape(link.URI)
if !removeAssets {