mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
♻️ Upgrade pdfcpu to v0.9.1 https://github.com/siyuan-note/siyuan/issues/13305
This commit is contained in:
parent
384bec36a3
commit
4feaa2aa5f
4 changed files with 12 additions and 6 deletions
|
|
@ -42,13 +42,15 @@ func PdfListLinks(ctx *model.Context) (assets, others []model.LinkAnnotation, er
|
|||
return
|
||||
}
|
||||
|
||||
const PdfOutlineScheme = "pdf-outline"
|
||||
|
||||
func PdfListToCLinks(ctx *model.Context) (ret []model.LinkAnnotation, err error) {
|
||||
for pg, annos := range ctx.PageAnnots {
|
||||
for k, v := range annos {
|
||||
if model.AnnLink == k {
|
||||
for _, va := range v.Map {
|
||||
link := va.ContentString()
|
||||
if strings.HasPrefix(link, "pdf-outline://") {
|
||||
if strings.HasPrefix(link, PdfOutlineScheme+"://") {
|
||||
l := va.(model.LinkAnnotation)
|
||||
l.Page = pg
|
||||
ret = append(ret, l)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue