mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Make getTextContent return offset array and improve the algorithm. Make
parts in viewer.js work again.
This commit is contained in:
parent
e13846821c
commit
a38c4bc729
3 changed files with 64 additions and 7 deletions
|
@ -88,7 +88,7 @@ limitations under the License.
|
|||
<button id="viewOutline" class="toolbarButton group" title="Show Document Outline" tabindex="2" data-l10n-id="outline">
|
||||
<span data-l10n-id="outline_label">Document Outline</span>
|
||||
</button>
|
||||
<button id="viewSearch" class="toolbarButton group hidden" title="Search Document" tabindex="3" data-l10n-id="search_panel">
|
||||
<button id="viewSearch" class="toolbarButton group" title="Search Document" tabindex="3" data-l10n-id="search_panel">
|
||||
<span data-l10n-id="search_panel_label">Search Document</span>
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -1043,7 +1043,7 @@ var PDFView = {
|
|||
function extractPageText(pageIndex) {
|
||||
self.pages[pageIndex].pdfPage.getTextContent().then(
|
||||
function textContentResolved(textContent) {
|
||||
self.pageText[pageIndex] = textContent;
|
||||
self.pageText[pageIndex] = textContent.text;
|
||||
self.search();
|
||||
if ((pageIndex + 1) < self.pages.length)
|
||||
extractPageText(pageIndex + 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue