Skip to content

How to render text layer #7072

Description

@mzabriskie

I am trying to render the text content of a PDF as is done here. I wasn't able to find an exposed API that would support this, event though #858 makes reference to page.renderTextLayer. Digging through the source I was able to find page.getTextContent and was able to get PDFJS.renderTextLayer by including src/display/text_layer.js in my source. Even then the text layer doesn't render as expected.

Two questions:

  1. Why does the PDF text layer render incorrectly (example | source)?
  2. Why isn't renderTextLayer exposed on either the page or PDFJS objects?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions