Sumatra PDF is a PDF, ePub, MOBI, CHM, XPS, DjVu, CBZ, CBR reader for Windows

Default color for Underline annotation [Supported in pre-release 3.4.14185+]

Hi,
I have been using the experimental annotation features in V3.3 Is there any easy way to change the default color setting for underline and squiggle?

Many thanks

old way was to edit the annotations file with hex values
new way is so much better just pulldown the color tree

[LATER EDIT]
see later post for change in Underline support
(but not currently squiggle)

Can you put an option for color the text please?

Underline default colour is Lime (Green)
Highlight default colour is Yellow

In the past you could change those the same as others individually with the editor.

However see later post for changing their default colors.

Hello, is there any possibility to create underline annotation shortcut to “u” like “a” for highlight? That would be convenient for user after release. Thank you

you could add to open issue

[Later Edit]
This was variable 5/6 keys =
context key > then up > up > [ may need another up] enter > U

However in 3.4.14185 has been added as one key u and default colour can be included in Advanced SumatrPDF-settings.txt

yeah, seems that could be enabled using AHK. well thanks.

I already open the issue in github. [Suggestion] Underline Hotkey Shortcut to “u” · Issue #2157 · sumatrapdfreader/sumatrapdf

Thank you

1 Like

Your issue as you may know was closed in 3.4.14185 as it has been added as one key u and default colour can also be included in Advanced SumatrPDF-settings.txt

1 Like

@Underlin @nyonyo @vafs98

If not already included, you can change UnderlineColor in version 3.4.14185+ like in this example

Annotations [
	HighlightColor = #ffff00
	UnderlineColor = #ff00ff
	TextIconColor = #ffff00
	TextIconType = comment
	DefaultAuthor = (none)
]
1 Like

@GitHubRulesOK that is really useful, thanks.

Is there also a bindkey to save annotation to the existing pdf (rather than having to do it via the annotation popup)

In a way there is: Shift - F10', cursor up, enter`.

Shift-F10 brings the context menu
cursor up selects Save Annotations command
enter executes the command.

1 Like

Note a feature of annotation apps in general (not just SumatraPDF) is that each time an object is added then saved (OR later deleted in another session), it edits the PDF by adding a new appendix annotations index (xref table).

So it is not a good idea to keep saving work in progress unless you have first made a lot of additions (or deletions) you wish to protect, as it can quickly bloat the end of file and take longer to traverse the index next time.

Also beware the example I show in Undo highlights - #2 by GitHubRulesOK

So overall it is best to only save annotations when closing the file which should be optional and easy to reject or accept (no need for a hot key)

woah. I can script this now using AHK. thank you!

#If WinActive("ahk_exe sumatrapdf.exe") ;
; Open Acrobat from SumatraPDF
!o::
Send !{f}a
return

; Save annotation 
F3::
Send +{F10}
Send {Up}
Send {Enter}
return

#IfWinActive

Inspired by @benyaminl’s Oct 29 post, I make the following AHK script to add underline in color red (default being lime) to a selection. My company’s computer cannot run the pre-release version, so I’m stuck with v3.3. The script may not work for other versions since the context menu may not be the same.

#If WinActive("ahk_exe sumatrapdf.exe") ;
; Add underline in red with Ctrl+U
^u:: 
Send +{F10}
Send {Up}
Send {Up}
Send {Right}
Send u
Send {Down}{End}
Send +{Tab} 
Send +{Tab} 
Send +{Tab} 
Send +{Tab} 
Send r

; Save annotation 
F3::
Send !f
Send {Down}{Down}{Down}{Down}{Down}

#IfWinActive
1 Like