{"id":24156315,"url":"https://github.com/utkarsh212/react-pdftotext","last_synced_at":"2025-07-05T18:08:12.121Z","repository":{"id":224189845,"uuid":"762210089","full_name":"Utkarsh212/react-pdftotext","owner":"Utkarsh212","description":"Light-weight memory-safe client library for extracting plain text from pdf files.","archived":false,"fork":false,"pushed_at":"2024-11-17T18:45:18.000Z","size":146,"stargazers_count":19,"open_issues_count":5,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-26T01:41:02.027Z","etag":null,"topics":["npm","package","pdf-document-processor","pdf-to-text","pdfjs","react","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/react-pdftotext","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Utkarsh212.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-23T09:59:17.000Z","updated_at":"2025-06-13T09:13:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"a72cd65f-cbce-42bc-9ca0-5702f0f64d58","html_url":"https://github.com/Utkarsh212/react-pdftotext","commit_stats":null,"previous_names":["utkarsh212/react-pdftotext"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Utkarsh212/react-pdftotext","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Utkarsh212%2Freact-pdftotext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Utkarsh212%2Freact-pdftotext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Utkarsh212%2Freact-pdftotext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Utkarsh212%2Freact-pdftotext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Utkarsh212","download_url":"https://codeload.github.com/Utkarsh212/react-pdftotext/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Utkarsh212%2Freact-pdftotext/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261984416,"owners_count":23240284,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["npm","package","pdf-document-processor","pdf-to-text","pdfjs","react","typescript"],"created_at":"2025-01-12T13:16:39.583Z","updated_at":"2025-07-05T18:08:12.101Z","avatar_url":"https://github.com/Utkarsh212.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-pdftotext\n\nLight-weight memory-safe client library for extracting plain text from pdf files.\n\n## Installing\n\nUsing npm:\n\n```js\nnpm install react-pdftotext\n```\n\n## Example\n\n**Local File Input**\n\nNow add a input tag with type=\"file\" to take file input.\n\n```html\n\u003cinput type=\"file\" accept=\"application/pdf\" onChange={extractText} /\u003e\n```\n\nImport the pdf2text function from package\n\n```js\nimport pdfToText from \"react-pdftotext\";\n\nfunction extractText(event) {\n  const file = event.target.files[0];\n  pdfToText(file)\n    .then((text) =\u003e console.log(text))\n    .catch((error) =\u003e console.error(\"Failed to extract text from pdf\"));\n}\n```\n\n**Remote PDF File Input**\n\nFor Pdf files stored at remote locations\n\n```js\nimport pdfToText from 'react-pdftotext'\n\nconst pdf_url = \"REMOTE_PDF_URL\"\n\nfunction extractText() {\n    const file = await fetch(pdf_url)\n        .then(res =\u003e res.blob())\n        .catch(error =\u003e console.error(error))\n\n    pdfToText(file)\n        .then(text =\u003e console.log(text))\n        .catch(error =\u003e console.error(\"Failed to extract text from pdf\"))\n}\n```\n\n## Contributing\n\nThis project welcomes contributions and suggestions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Futkarsh212%2Freact-pdftotext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Futkarsh212%2Freact-pdftotext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Futkarsh212%2Freact-pdftotext/lists"}