Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

on getPageText, DocumentViewer returns undefined if text has not yet been presented in the viewer #53

Open
AbeHandler opened this issue Apr 10, 2015 · 0 comments

Comments

@AbeHandler
Copy link

Go to this URL: https://www.documentcloud.org/documents/1314000-sbrown-2014-2017-executed-contract.html

In console, run:

DV.viewers[_.keys(DV.viewers)[0]].api.getPageText(2)

It returns undefined.

Now go to page 2. Click the text tab. The text loads. Then in the console, run this again:

DV.viewers[_.keys(DV.viewers)[0]].api.getPageText(2)

This time, it returns page 2 of the document text.

It would be great if the API would pull the requested text on call to getPageText -- even if the user has not clicked that text tab yet. I need this functionality in order to (cleanly) add span tags around each token in the document text. Trying to do this: datamade/parserator#16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant