File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -1085,8 +1085,8 @@ Return the new annotation."
1085
1085
(pdf-annot-activate-annotation a))
1086
1086
a))
1087
1087
1088
- (defun pdf-annot-add-text-annotation (pos &optional icon property-alist )
1089
- " Add a new text annotation at POS in the selected window.
1088
+ (defun pdf-annot-add-text-annotation (pos &optional icon property-alist page )
1089
+ " Add a new text annotation at POS on PAGE in the selected window.
1090
1090
1091
1091
POS should be a image position object or a cons \( X . Y\) , both
1092
1092
being image coordinates.
@@ -1114,6 +1114,9 @@ Return the new annotation."
1114
1114
(list posn)))
1115
1115
(pdf-util-assert-pdf-window)
1116
1116
(when (posnp pos)
1117
+ (setq page (or page
1118
+ (when pdf-view-roll-minor-mode
1119
+ (1+ (/ (posn-point pos) 4 )))))
1117
1120
(setq pos (posn-object-x-y pos)))
1118
1121
(let ((isize (pdf-view-image-size))
1119
1122
(x (car pos))
@@ -1139,7 +1142,8 @@ Return the new annotation."
1139
1142
pdf-annot-default-text-annotation-properties
1140
1143
(cdr (assq 'text pdf-annot-default-annotation-properties))
1141
1144
(cdr (assq t pdf-annot-default-annotation-properties))
1142
- `((color . ,(car pdf-annot-color-history))))))))
1145
+ `((color . ,(car pdf-annot-color-history))))
1146
+ page))))
1143
1147
1144
1148
(defun pdf-annot-mouse-add-text-annotation (ev )
1145
1149
" Add a text annotation using the mouse.
You can’t perform that action at this time.
0 commit comments