Поиск в Поддержке

Избегайте мошенников, выдающих себя за службу поддержки. Мы никогда не попросим вас позвонить, отправить текстовое сообщение или поделиться личной информацией. Сообщайте о подозрительной активности, используя функцию «Пожаловаться».

Learn More

Ctrl+F is not effective with lenghty documents

more options

Hello.

When I use Firefox to open a .pdf file that is long and "heavy" (it's a 600 page book scan with OCR), searching with Ctrl+F gets sloppy. Searching clearly skips some of the appearances of the phrase. I compared the results with other .pdf readers as well as Chrome. The latter one, for example, brings 190 search results while Firefox makes it 172. With more specific search, it's 3 to 2 or sometimes 1 to none.

I believe the reason is that file doesn't load entirely upon opening - rather, it loads pages as I'm scrolling. Even though Firefox has some useful features as a .pdf reader that Chrome lacks, like two pages view, this flaw alone kind of kills it for some uses.

Is there any fix for this? Like maybe forcing Firefox to load an entire document at once?

Cheers, Rafał

Hello. When I use Firefox to open a .pdf file that is long and "heavy" (it's a 600 page book scan with OCR), searching with Ctrl+F gets sloppy. Searching clearly skips some of the appearances of the phrase. I compared the results with other .pdf readers as well as Chrome. The latter one, for example, brings 190 search results while Firefox makes it 172. With more specific search, it's 3 to 2 or sometimes 1 to none. I believe the reason is that file doesn't load entirely upon opening - rather, it loads pages as I'm scrolling. Even though Firefox has some useful features as a .pdf reader that Chrome lacks, like two pages view, this flaw alone kind of kills it for some uses. Is there any fix for this? Like maybe forcing Firefox to load an entire document at once? Cheers, Rafał

Все ответы (5)

more options

Rafau said

I believe the reason is that file doesn't load entirely upon opening - rather, it loads pages as I'm scrolling.

Hi Rafał, I also assume that is the reason. Firefox is rendering the PDF as a canvas with an invisible text layer on top and it probably doesn't try to generate all 600 pages at once, but waits until you scroll down to a certain point. Is there a setting or a trick to make it generate them all without sitting there and scrolling down? I mean a script could drive the scrolling while you attend to other things, but I don't know how well that would work.

Do you know of any large PDFs on the web (no login required) that exhibit this problem which could be used for experimenting?

more options

If I use the Inspector to check out files rendered by pdfjs then it usually looks very complicated and text isn't contiguous, but even words are split over various span elements that can cause find not working properly.

You can check words that Firefox finds with words that aren't found in the Inspector.

more options

Update: there is a different reason.

Chrome searches up for hyphenated words while Firefox does not. See the picture: it's a Chrome screen. Firefox found 11 words rather than 14, and the 3 omitted ones are indeed hyphenated.

I am not sure whether not loading documents fully still applies.

jscher2000 said

Do you know of any large PDFs on the web (no login required) that exhibit this problem which could be used for experimenting?

Try https://openlibrary.org/ . The "Classic Books" sections contains lots of those. "Journey to the Center of the Earth" here is trifle 41.6 MB. https://ia600105.us.archive.org/16/items/journeytocentreo00vern_3/journeytocentreo00vern_3.pdf

more options

Sorry that you are having a problem with the Firefox PDF Reader (PDF.JS).

IMO, long PDF documents may exceed the capabilities of PDF.JS - period. I feel that Mozilla 'hit the limit' of what can be done with it, to make it better and fix its faults.

I use Fox-It PDF reader for documents that large / long, which is what I used before PDF.JS was built into Firefox.

more options

Rafau said

Chrome searches up for hyphenated words while Firefox does not. See the picture: it's a Chrome screen. Firefox found 11 words rather than 14, and the 3 omitted ones are indeed hyphenated.

Page 204 (physical page 302) of Journey... has a hyphenated word that neither browser matches:

determina-
tion

I wonder why Chrome disregards some hyphens and not others.