sumatrapdfreader / sumatrapdf

SumatraPDF reader
http://www.sumatrapdfreader.org
GNU General Public License v3.0
13.43k stars 1.71k forks source link

Highlight: only one possible color currently #3607

Closed A-Infor closed 3 months ago

A-Infor commented 1 year ago

As discussed since a year ago, it would be nice to be able to have more than one HighlightColor under Annotations on SumatraPDF-settings.txt.

Why? Because, then, it would be possible to customize keyboard shortcuts in order for different keys to correspond to different highlighter pen colors.

I am sure that I am not the only one that have more than one highlighter pen on my case, being each of a different color, for highlighting on paper.

In my workplace, yellow, red, and green are specially useful. People understand better what the document is about with yellow, and see easily what is correct with green, and what is wrong with red.

Why not have the same choice on SumatraPDF settings file? The other option is to print the PDFs in order to do the highligting, but this is not desirable. Otherwise, why use a PDF reader?

kjk commented 1 year ago

The right solution here would be to have commands that can take (optional) arguments.

Then you could create a key binding e.g.:

[
  Cmd = CmdCreateAnnotHighlight #ff0000
  Key = b
]
Yasura47 commented 12 months ago

I tried it. It works except the color part. It uses the same color that in Annotation part not the one in the shortcut. What am i missing?

[ Cmd = CmdCreateAnnotHighlight Key = d Color = #eda55c OpenEdit = false ]

Thank You!

kjk commented 12 months ago

Well, it's not implemented yet, just an idea.

Yasura47 commented 12 months ago

Oh, Thank You!

kjk commented 3 months ago

In pre-release 16374 or later (https://www.sumatrapdfreader.org/prerelease) you can do:

Shortcuts [
    [
        Cmd = CmdCreateAnnotHighlight #00ff00 openedit
        Key = b
    ]
]

This creates shortcut b for creating green highlight See https://www.sumatrapdfreader.org/docs/Customizing-keyboard-shortcuts

tomasrei commented 3 weeks ago

In pre-release 16374 or later (https://www.sumatrapdfreader.org/prerelease) you can do:

Shortcuts [
  [
      Cmd = CmdCreateAnnotHighlight #00ff00 openedit
      Key = b
  ]
]

This creates shortcut b for creating green highlight See https://www.sumatrapdfreader.org/docs/Customizing-keyboard-shortcuts

I find that this doesnt work. I have in my settings:

Shortcuts [
    [
        Cmd = CmdCreateAnnotHighlight #00ff00 openedit
        Key = b
    ]
]

The log:

CreateSumatraAcceleratorTable: unknown cmd name 'CmdCreateAnnotHighlight #00ff00 openedit'

I'm using v 3.5.2 (portable edition)

GitHubRulesOK commented 3 weeks ago

@tomasrei it will not work in 3.5.2 only in 3.6.16374 + currently https://www.sumatrapdfreader.org/prerelease

tomasrei commented 3 weeks ago

@tomasrei it will not work in 3.5.2 only in 3.6.16374 + currently https://www.sumatrapdfreader.org/prerelease

Thanks! It works now :)