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

[api-minor] Include the document /Lang attribute in the textContent-data #17941

Merged
merged 1 commit into from
May 14, 2024

Commits on May 14, 2024

  1. [api-minor] Include the document /Lang attribute in the textContent-data

     - These changes will allow a simpler way of implementing PR 17770.
    
     - The /Lang attribute is fetched lazily, with the first `getTextContent` invocation. Given the existing worker-thread caching, this will thus only need to be done *once* per PDF document (and most PDFs don't included this data).
    
     - This makes the /Lang attribute *directly available* in the `textLayer`, which has the following advantages:
        - We don't need to block, and thus delay, overall viewer initialization on fetching it (nor pass it around throughout the viewer).
    
        - Third-party users of the `textLayer` will automatically benefit from this, once we start actually using the /Lang attribute in PR 17770.
          *Please note:* This also, importantly, means that the `text` reference-tests will then cover this code (which wouldn't otherwise have been the case).
    Snuffleupagus committed May 14, 2024
    Configuration menu
    Copy the full SHA
    6d523c3 View commit details
    Browse the repository at this point in the history