-1

I discovered that earlier versions of code that are used to extract texts using PDFJS no longer work with the recent version of PDFJS. Here are some previous versions

Extract text from pdf file using javascript

how to correctly extract text from a pdf using pdf.js

extract text from pdf in Javascript .

Does anyone have a current code that works?

jufrfa
  • 51
  • 1
  • 7

1 Answers1

-1

Iterate over getTextContent()s return value.

pdfDoc.getPage(1).then((p) => {
p.getTextContent().then((textContent) => {
// Iterate here
});
});
Johan Sjolen
  • 133
  • 1
  • 8
  • Not unless you have a more specific thing you'd like to know – Johan Sjolen Jul 23 '18 at 10:38
  • Actually I have already solve this problem. I upload the file then I can read the file with javascript but I would like to read it directly from an input type file. Do you know how to read the pdf from an input type file? – jufrfa Jul 24 '18 at 15:22