Forum moved here!

Home / From CLI, opening to a certain page and highlighting some text?

shodan

Hi,

I work in aviation and I open tons of pdf daily

Currently I use adobe reader but, on top of being slow, it’s missing something that would make my life much easier. The ability to highlight text.

So, often I need to find a justification for making a decision, so I dig through the text until I find the “key sentence”.

I have a simple program I have made to help me quickly find passages in the manuals, with one click I can open my pdf to the right page but then I don’t always know where my text is. Some time it can be gone after the manual has updated too.

So, I would like to open the pdf to a specific page and then highlight the text or a region on the screen (maybe more than one region ? Can I choose the color ?)

Is this possible with this program as it exists ?

thank you !

GitHubRulesOK

@shodan

using CLI commands you can jump to numbered page (or bookmark) and also if you want scroll down to a given position see -named-dest OR -page [and -scroll<x,y>]
https://www.sumatrapdfreader.org/docs/Command-line-arguments.html

You will need the pre-release version for highlight, it is not there in “normal” version since it is classed as experimental I suggest you use a “portable” version for testing https://www.sumatrapdfreader.org/prerelease.html

The following is no longer relavant due to later retiring of smx functionality

Beware there are two modes in advance settings (save into PDF true or false) I suggest you use false as it will not affect your original, however it does mean you need to keep the document.smx file with the pdf
For more info on which key to use for [A]nnotation and how to change its shape or appearance see MyNotes (unofficial) at https://github.com/GitHubRulesOK/MyNotes/blob/master/AppNotes/SumatraPDF/Annotation%20in%20SumatraPDF.pdf

you have some program skills so you may find an easy way to edit the .smx file so that you can change the size or style of the highlight and its position(s) on the page.

shodan

Thank you that looks great !
I will soon try to integrate this with my work flow
I think I can generate the smx files to do lots of useful things !

GitHubRulesOK

Beware the .smx at present will only allow the 4 types [highlight] [underline] [strikethrough] [squiggly]
anything else is flushed on a fresh save, do not complain if you edit it with any other entry and it disappears
so NO comments etc (as far as I can tell), they may stick for a while but get purged with a save as…
nod5 is looking into further support with his update but it will most likely need a separate support file for notes etc. unless someone updates SumatraPDF code in this area

[LATER EDIT] This thread is now locked as the experimental Sumatrapdf Meta eXtension a.k.a. SMX feature has been retired. It is replaced in latest Pre-Releases by newer, more extensive PDF annotations features.

Also there is the new command line -search command