Forum moved here!

Home / Search and select in epub

Sandy

I like reading epub files with Sumatra because it is so simple. However, the Sumatra version I use, 2.5.2, cannot search for or select text in epub files. Can the newer version 3 do this?

Thanks.

GitHubRulesOK

Versions 2.5.2 and onwards behave the same way with 2 modes of epub viewer

When you change the advanced setting UseFixedPageUI from false to true:

EbookUI [
	FontName = Georgia
	FontSize = 12.5
	TextColor = #5f4b32
	BackgroundColor = #fbf0d9
	UseFixedPageUI = true
]

you get the other format which includes Table of contents (if there is one), zoom also select and search

Sandy

That works. It’s great!

Thanks a lot.

endolith

Awesome! UseFixedPageUI = true makes it behave like a PDF instead of the weird eBook UI.

hover

When I set UseFixedPageUI = true, UI theme is not present. How to keep UI theme and still be able to select text ?

If UseFixedPageUI = true is activated with different background color, then pdfs are all set with that color.

Would it be possible that pdfs are rendered with default settings when using UseFixedPageUI = true ?

GitHubRulesOK

Setting UseFixedPageUI = true takes effect on next document refresh (use the R key or reopen file)
Then the epub mode User Interface is replaced by the same one that is used for PDF’s
The coloured backgrounds are independent, only the chosen Font from ReflowingUI, is used in the FixedPageUI and the Font size is varied from 72ppi to 96dpi @100% so often looks smaller unless you zoom in to compensate or use 16pt to replace 12pt etc.

You can set both colour backgrounds to be the same (using settings file or shortcuts for Fixed Page colour range) but not tell either UI to change colour to the other.
one shortcut with SumatraPDF.exe -set-color-range #5f4b32 #fbf0d9
should start SumatraPDF so Fixed interface looks similar to epub default and a second shortcut SumatraPDF.exe -set-color-range #000000 #ffffff
would start with the FixedPage as per its normal default.

legp

Excellent program, I love it, with the search function, you can also select and copy text. Is it possible to copy the format when using copy and paste in a Word document? When I copy a paragraph from an EPUB that has a few words in italics, it pastes everything in different paragraphs and everything in round type. Is there a way that copying will keep these things unchanged?

GitHubRulesOK

Copying plain text from an eBook via the clipboard does not see the broader information such as font name or style.
All you are copying is literally any letters (hopefully they are combined as words but thats not always the case) and annoyingly for some related embeded punctuation such as white space, line feeds or paragraph endings.

Thus using SumatraPDF that way is unlikely to help keep much in the way of formatting, However If you select an area then the clipboard will save the visually formatted screen info as an image. (but you can also use windows snip and clip to do that)

To extract formatted text from an eBook you need to use a conversion or editor app that re-applies the format locally to the plaintext extracted. So best type of app might be Words own importer just like it does for PDFs, next best would be a converter such as calibre but not sure how well that works for partial pages.
A reputedly good ePub editor is Sigil for Windows HOWEVER using that as a yardstick we can see the Italic Heading is surrounded by < i >< / i> and may expect that a cut and paste from Sigil to WordPad would include some replacement italic format BUT unfortunately windows does not do that. Proving the point the clipboard is not intelligent enough for cut and paste formatting unless the source is RICH text