Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

438
Views
How to extract text from PDF in React native

I want to extract text from the pdf file I selected in React native. Although I tried many ways like pdf2Json, pdf parse, they all contain errors. All running with node and giving fs error.

for pdf parse, MyCode:

const fs = require("fs");
const parser = require("pdf-parse");

const file = fs.readFile("./sample.pdf");

parser(file).then(function (data) {
  console.log(data.text);
 });

It works when I run my code as node Parser.js, but I can't use it in react native. How can I run this code with a button onpress? Is there anyone who can help?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!