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:
- Why does the PDF text layer render incorrectly (example | source)?
- Why isn't
renderTextLayer exposed on either the page or PDFJS objects?
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 findpage.getTextContentand was able to getPDFJS.renderTextLayerby includingsrc/display/text_layer.jsin my source. Even then the text layer doesn't render as expected.Two questions:
renderTextLayerexposed on either thepageorPDFJSobjects?