Closed Bug 1062025 Opened 10 years ago Closed 6 years ago

Implement matches count for pdfjs

Categories

(Firefox :: PDF Viewer, defect, P2)

32 Branch
x86
macOS
defect

Tracking

()

RESOLVED FIXED
Firefox 64
Tracking Status
firefox59 --- wontfix
firefox60 --- wontfix
firefox61 --- wontfix
firefox62 --- wontfix
firefox63 --- wontfix
firefox64 --- fixed

People

(Reporter: tomasz, Assigned: Snuffleupagus)

References

Details

(Whiteboard: [pdfjs-c-integration])

Attachments

(1 file)

I was doing investigation for bug 429732. Have a look at bug 429732 comment 51: if we delegate the search work to pdfjs find then we shouldn't do the matches counting using 'standard' find because the results will be inconsistent.

Examples: (hit highlight all to see two matches but there will be just one reported)

Search for 'font size':
http://www.iteksoft.com/download/demo/demoform1.pdf

Search for 'all work':
http://www.irs.gov/pub/irs-pdf/fw4.pdf
Component: Find Toolbar → PDF Viewer
Product: Toolkit → Firefox
That's new functionality for Firefox. Do you know a bug when "matches count" function was introduced in Firefox?
Priority: -- → P2
Whiteboard: [pdfjs-c-integration]
It was introduced in bug 257061.
Version: unspecified → 32 Branch
One of the white space is [0x0D 0x0A] instead of0x0020.
i.e., 'font[0x0D 0x0A]size' and  'all[0x0D 0x0A]work'.

The match count seems to ignore them.
Currently PDF viewer does not count total amount of matches. I think the find bar pulls this information only from visible pages atm.
When I Search for 'all work':
http://www.irs.gov/pub/irs-pdf/fw4.pdf
as specified in comment 0 and keep hitting next, the display says "1 of 1 matches" but cycles between two locations.

When I search for "rollover" in https://www.fidelity.com/bin-public/060_www_fidelity_com/documents/automatic-withdrawals-ira.pdf
and keep hitting next the display always says "3 of 3 matches" but cycles through three locations.
in current release of firefox (51), the matches count isn't displayed for searches of PDFs (therefore there is no longer a wrong count shown). thus, should this bug be renamed something like "properly implement matches count for PDFs"?
Flags: needinfo?(tkolodziejski)
Flags: needinfo?(tkolodziejski)
Summary: Count matches wrong for pdfjs → Implement matches count for pdfjs
Looks like this is still an issue, with duplicates reported regularly.
Assignee: nobody → jonas.jenwald
Attachment #9008490 - Flags: review?(bdahl)
Depends on: 1489996
Attachment #9008490 - Flags: review?(bdahl) → review+
Keywords: checkin-needed
Pushed by ccoroiu@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/b747e4382671
Forward the matchesCount from the PDF.js viewer to the browser findbar. r=bdahl
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/b747e4382671
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 64
When I load the two PDF files from comment 16 the search function works and gives correct counts. Thank you.

But if I restart Nightly with those two windows open I run into problems.

- With the IRS form control-F doesn't work until I explicitly reload the PDF tab.
- With the Fidelity form control-F usually doesn't work even after a reload, but once I got it into a state where the find bar was open but control-F wouldn't focus on it.

I could open the PDF files in a new tab and find would work correctly for the new tabs. I'm using Linux.

Is this a know issue? Should a new bug report be created?
(In reply to B.J. Herbison from comment #17)
> When I load the two PDF files from comment 16 the search function works and
> gives correct counts. Thank you.
> 
> But if I restart Nightly with those two windows open I run into problems.
> 
> - With the IRS form control-F doesn't work until I explicitly reload the PDF
> tab.
> - With the Fidelity form control-F usually doesn't work even after a reload,
> but once I got it into a state where the find bar was open but control-F
> wouldn't focus on it.
> 
> I could open the PDF files in a new tab and find would work correctly for
> the new tabs. I'm using Linux.
> 
> Is this a know issue? Should a new bug report be created?

That sounds like bug 1486984, and should be completely unrelated to the matches counter.
I have reproduced this bug with Nightly 34.0a1 (2014-09-02) on Ubuntu 12.04, 64 Bit LTS!
This bug's fix is verified with latest Nightly!

Build ID 	20180925220052
User Agent 	Mozilla/5.0 (X11; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0
QA Whiteboard: [bugday-20180926]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: