CmdCreateAnnotStrikeOut does not accept color args, and using it without color args has a invisible strikeout
SumatraPDF version
- Latest
Describe the bug Using this custom shortcut, it does not create anything:
Shortcuts [
[
{
Cmd = CmdCreateAnnotStrikeOut #000000
Key = s
}
]
]
However, if I remove the color hex code, it creates a StrikeOut annotation that is not visible for some reason. See image for this.
Expected behavior Based on the default color set by
Annotations [
HighlightColor = #ffff00
UnderlineColor = #ff0000ff
SquigglyColor = #ff00ff
StrikeOutColor = #000000ff
FreeTextColor = #0011ffff
FreeTextSize = 12
FreeTextBorderWidth = 1
TextIconColor =
TextIconType =
DefaultAuthor =
]
It should automatically set it to black. However, neither the StrikeOut accepts color arguments as nothing shows up, not even an invisible StrikeOut, but not adding the color arg, shows an invisible strikeout.
File that reproduces the problem If this is related to a specific PDF etc. file, please attach the file.
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.
@dpds-md your problems are perhaps due to bracketing so for blue it should be
Shortcuts [
[
Cmd = CmdCreateAnnotStrikeOut #0000ff
Key = s
]
]
@kjk I am seeing a slightly different problem as strike out for me is sticking at red and ignoring settings.txt changes above custom works but stock setting in 6 or 8 hex characters seems to make no difference ??
@GitHubRulesOK @kjk
I see what my issue was. I was on the stable release rather than on the pre-release build. 3.5.2 stable does was giving this issue. However, with the pre-release version, my issue is resolved, slightly.
I am able to replicate your issue here. See the various hex changes and see how they are responding. The strikeout are represented in Order as code describes below:
Test 1: StrikeOutColor = #00ff00ff Cmd = CmdCreateAnnotStrikeOut #ff8800ff Test 2: StrikeOutColor = #00ff00ff Cmd = CmdCreateAnnotStrikeOut #ff8800 Test 3: StrikeOutColor = #00ff00 Cmd = CmdCreateAnnotStrikeOut #ff8800 Test 4: StrikeOutColor = #00ff00 Cmd = CmdCreateAnnotStrikeOut #ff8800ff
As you can see below, I do not even know where the purple line comes from as Annotations settings use Green, and Shortcut command uses orange. It does seem that Hex 8 is not being registered, but hex 6 is registered.
Edit 1: Is there a way to modify the line thickness? I did not see this option in the arguments within the documentation. It would be slightly useful feature to have imo.
@dpds-md offhand without testing what and why its that way the strikeout annotations are AFAK given solid without Alpha (but may have been included sometimes?) thus purple/magenta would be roughly FF##FF where more of middle green may tend towards lighter, cant be sure as currently seem odd.
As for width it's usually a PDF default of 1 Point thick unless a floating point slider is provided