Forum moved here!

Home / Annotate (highlight / add comments) with SumatraPDF

Page

How to add texts and notes when you read PDF?

GitHubRulesOK

Highlight Annotation has generally been available in Pre-release for a long time. Now both text comment and free text have been added (amongst others).

Current daily/pre-release builds allow you to annotate PDF (only).

image

Previous experiments to highlight other file formats in FixedPageUI (only) using .smx are now retired.

To highlight selectable text, simply select by swiping with left button down, then as before press A (or use the context menu to Create Anotation > Highlight)

NOTES
currently highlights CANNOT BE MOVED you need to replace (and delete the original). Color and other appearances can be changed.
Objects such as Carets, Comments, Stamps etc. can be moved by dragging.
Free text is currently not free-form to alter size so for now simply set the boundary to 0

Remember for PDF files up to 32 MB you can edit the same file/page in both Edge and SumatraPDF at the same time.
After a change in SumatraPDF you need to save annotation and in Edge you wil ALSO need to hit reload/refresh, However when you SAVE file changes e.g. after inking in Edge there is no need to hit refresh in SumatraPDF it will appear instantly.

Alonso

Hello everyobody,

Does the latest Sumatra version enable highlights, for other than search, and bookmarks? I haven´t found the way so far. If so, could anybody please tell me how to do it or where to find it?

Thank you on advance

SumatraPeter

@Alonso: You’ll need to use one of the daily or pre-release versions as mentioned above.

Alonso

I see, thank you very much!

subs

any option to highlight/annotate a mobi / epub file ?

even using the pre-release ? i couldn’t get an option to do this.

thanks!

GitHubRulesOK

It WAS possible in past pre-releases (and was usable/useful for txt chm and mobi / epub / ebooks in fixed interface) and for a while there were two systems, so full release 3.2 can still work with those .smx files, thus possible to hand (text-program) write your own.

However that historic method was removed after 3.3.13011 as the newer PDF annotation methods increasingly conflicted.
It is possible to find older pre-release copies lurking with the ability to add highlights to mobi / epub but deletion was notoriously buggy, thus often for changes, involved resorting back to adjusting values in a text editor.

If you want to see how it worked and have 3.2 (portable will do) rename any epub file to Any.epub
Save the following text in the same folder as Any.epub.smx (that is the same filename with.smx which roughly=SumatrapdfMetaXtension)

# SumatraPDF: modifications to "Any.epub"
[@meta]
version = 3.3.1####
filesize = 
timestamp = 

[highlight]
page = 1
rect = 25.0000 20.0000 100.0000 50.0000
color = #ff80ff
opacity = 0.8


[highlight]
page = 1
rect = 25.0000 100.0000 80.0000 50.0000
color = #80ffff
opacity = 0.6

Open Any.epub and ENSURE you see the “Find:” search box (Debug > Toggle ebook UI should be checked) see the result of color blocks below (they were always paler in non pdf files, even when opacity=1.0), now play with the values in Notepad to align with some text (HINT use SumatraPDF M for measure tool). Not the easiest way to work but I sometimes will use that for long text files as no other app can do that, as far as I know with plain text.

image

NOTE placement in epub (and others is affected by a scale issue) so using the measure tool in points the calculated position needs to be muliplied by 96/72 =1.333

Here I am changing the measured value for the second highlight to match
top left in points is 95.0 x 73.6 and width = 178.8 x 32.6 so have added to smx as 126 96 240 50 (rounded for convenience)

It can seem slow to start but you find shortcuts like guess the rough position save in notepad with Ctrl S then refocus SumatraPDF and press R to reload that edit then skip on to the next there is no need for those decimals so
rect = 126 96 240 50
should work just as well

Another trick to reduce the mental math is to work in inches and ignore the decimals as 1.00 inches considered as 100 is close to the 96 dpi value needed
So for the screen position of uper highlight I can mentally round down a few percent

so here measuring in inches I need say 200 45 80 40 as less than 215 049 083 041

image

I may have been a bit aggressive in my rounding down, but the result is good enough

image

The file is not editing the ebook as it simply adds a companion file and for adding notes / comments per page in a seperate companion file I have elsewhere in the forum shown ways to do that (most easily with MS write / WordPad)

Jprakash_Mishra

sumatra is agreat pdf viewer, no dought but it need proper annotation function in it. plz include it developer bros

Prajjawal_Pathak

It would be awesome if you could add

> delete selected annotation

in right click context menu. This would be helpful and save a lot of time, instead of going to annotation manger we cloud directly delete annotations.
Thank you.

GitHubRulesOK

It is there as DEL key (and also selectable in the context menu)

I just hit del key on the one highlight and it went away (note it may not have been deleted its only now unlisted, which is a “feature” of incremental annotation writing)

NOTE:- the file with the now “hidden” highlight will still ask to save the source highlight AS its now invisible variant, so will still increase by as much in the annotations area. Clearly not a bug but its up to me to decide to discard ALL changes or keep those 2 recoverable changes in addition to all others.