mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 14:53:44 +08:00
1 parent
60b8b44eca
commit
65a839f1e8
3 files changed
+131
No files matched your search
@@ -406,8 +406,14 @@ func (p *pdfImporter) linkAction(annotation pdfgo.Annotation, strict bool, curre
|
||||
case pdfgo.Name("LastPage"):
|
||||
index = len(p.editor.pages) - 1
|
||||
case pdfgo.Name("NextPage"):
|
||||
if index < 0 {
|
||||
return nil, &pdfgo.UnsupportedError{Feature: "relative page action without a fixed current page"}
|
||||
}
|
||||
index = min(index+1, len(p.editor.pages)-1)
|
||||
case pdfgo.Name("PrevPage"):
|
||||
if index < 0 {
|
||||
return nil, &pdfgo.UnsupportedError{Feature: "relative page action without a fixed current page"}
|
||||
}
|
||||
index = max(index-1, 0)
|
||||
default:
|
||||
return nil, nil
|
||||
|
||||
Reference in new issue
Block a user