{"id":15044295,"url":"https://github.com/fdawgs/node-unrtf","last_synced_at":"2026-01-08T16:20:59.195Z","repository":{"id":38198773,"uuid":"305964061","full_name":"Fdawgs/node-unrtf","owner":"Fdawgs","description":"Asynchronous Node.js wrapper for the UnRTF RTF conversion program","archived":false,"fork":false,"pushed_at":"2025-09-01T17:59:15.000Z","size":2133,"stargazers_count":6,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-01T18:40:45.896Z","etag":null,"topics":["async","converter","html","latex","nodejs","ps","rtf","rtf-converter","rtf-to-html","rtf-to-latex","rtf-to-ps","rtf-to-text","rtf-to-wpml","text","txt","unrtf","wpml"],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/node-unrtf","language":"Rich Text Format","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/Fdawgs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null},"funding":{"github":"Fdawgs"}},"created_at":"2020-10-21T08:52:21.000Z","updated_at":"2025-09-01T17:59:10.000Z","dependencies_parsed_at":"2023-12-18T18:56:19.824Z","dependency_job_id":"f1a81c8d-7cad-494f-8237-3919963f4e21","html_url":"https://github.com/Fdawgs/node-unrtf","commit_stats":{"total_commits":640,"total_committers":4,"mean_commits":160.0,"dds":0.4078125,"last_synced_commit":"de8d3eddee15f4d7d4c1c7a1f041f87f4dcaf987"},"previous_names":[],"tags_count":61,"template":false,"template_full_name":null,"purl":"pkg:github/Fdawgs/node-unrtf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fdawgs%2Fnode-unrtf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fdawgs%2Fnode-unrtf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fdawgs%2Fnode-unrtf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fdawgs%2Fnode-unrtf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Fdawgs","download_url":"https://codeload.github.com/Fdawgs/node-unrtf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fdawgs%2Fnode-unrtf/sbom","scorecard":{"id":49544,"data":{"date":"2025-08-11","repo":{"name":"github.com/Fdawgs/node-unrtf","commit":"7a3235b4bed8fcdbdba484abf458248968f99a0c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":7.5,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: src/lib/win32/unrtf-0.19.3/bin/unrtf.exe:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/23 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":10,"reason":"30 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":10,"reason":"GitHub workflow tokens follow principle of least privilege","details":["Warn: jobLevel 'contents' permission set to 'write': .github/workflows/cd.yml:21","Info: jobLevel 'contents' permission set to 'read': .github/workflows/cd.yml:41","Info: jobLevel 'contents' permission set to 'read': .github/workflows/cd.yml:76","Info: jobLevel 'contents' permission set to 'read': .github/workflows/ci.yml:37","Info: jobLevel 'contents' permission set to 'read': .github/workflows/ci.yml:52","Info: jobLevel 'contents' permission set to 'read': .github/workflows/ci.yml:90","Info: jobLevel 'contents' permission set to 'read': .github/workflows/ci.yml:112","Info: jobLevel 'contents' permission set to 'read': .github/workflows/ci.yml:161","Warn: jobLevel 'contents' permission set to 'write': .github/workflows/ci.yml:179","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql.yml:36","Info: jobLevel 'contents' permission set to 'read': .github/workflows/link-check.yml:43","Info: topLevel 'contents' permission set to 'read': .github/workflows/cd.yml:14","Info: topLevel 'contents' permission set to 'read': .github/workflows/ci.yml:27","Info: topLevel 'contents' permission set to 'read': .github/workflows/codeql.yml:25","Info: topLevel 'contents' permission set to 'read': .github/workflows/link-check.yml:35"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":4,"reason":"dependency not pinned by hash detected -- score normalized to 4","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/cd.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/Fdawgs/node-unrtf/cd.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/cd.yml:50: update your workflow using https://app.stepsecurity.io/secureworkflow/Fdawgs/node-unrtf/cd.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/cd.yml:81: update your workflow using https://app.stepsecurity.io/secureworkflow/Fdawgs/node-unrtf/cd.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/cd.yml:86: update your workflow using https://app.stepsecurity.io/secureworkflow/Fdawgs/node-unrtf/cd.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/Fdawgs/node-unrtf/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:55: update your workflow using https://app.stepsecurity.io/secureworkflow/Fdawgs/node-unrtf/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:60: update your workflow using https://app.stepsecurity.io/secureworkflow/Fdawgs/node-unrtf/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:93: update your workflow using https://app.stepsecurity.io/secureworkflow/Fdawgs/node-unrtf/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:115: update your workflow using https://app.stepsecurity.io/secureworkflow/Fdawgs/node-unrtf/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:120: update your workflow using https://app.stepsecurity.io/secureworkflow/Fdawgs/node-unrtf/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/Fdawgs/node-unrtf/codeql.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/Fdawgs/node-unrtf/codeql.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:52: update your workflow using https://app.stepsecurity.io/secureworkflow/Fdawgs/node-unrtf/codeql.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/link-check.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/Fdawgs/node-unrtf/link-check.yml/main?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/cd.yml:106","Warn: npmCommand not pinned by hash: .github/workflows/cd.yml:62","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:67","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:127","Info:   1 out of  15 GitHub-owned GitHubAction dependencies pinned","Info:   6 out of   6 third-party GitHubAction dependencies pinned","Info:   0 out of   4 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/Fdawgs/.github/SECURITY.md:1","Info: Found linked content: github.com/Fdawgs/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/Fdawgs/.github/SECURITY.md:1","Info: Found text in security policy: github.com/Fdawgs/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/cd.yml:34"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":8,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 20 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-14T23:26:47.029Z","repository_id":38198773,"created_at":"2025-08-14T23:26:47.030Z","updated_at":"2025-08-14T23:26:47.030Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274831537,"owners_count":25357882,"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","status":"online","status_checked_at":"2025-09-12T02:00:09.324Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["async","converter","html","latex","nodejs","ps","rtf","rtf-converter","rtf-to-html","rtf-to-latex","rtf-to-ps","rtf-to-text","rtf-to-wpml","text","txt","unrtf","wpml"],"created_at":"2024-09-24T20:50:24.159Z","updated_at":"2026-01-08T16:20:59.188Z","avatar_url":"https://github.com/Fdawgs.png","language":"Rich Text Format","funding_links":["https://github.com/sponsors/Fdawgs"],"categories":[],"sub_categories":[],"readme":"\u003e **Note**\n\u003e An UnRTF v0.19.3 binary is included as an optional dependency for Windows users via [node-unrtf-win32](https://github.com/Fdawgs/node-unrtf-win32) which, due to its age, has several issues,\n\u003e such as the [inability to convert RTF documents generated from 2007 onwards](https://github.com/Fdawgs/node-unrtf/issues/83), and a [bug in the\n\u003e `noPictures` option that still generates pictures](https://github.com/Fdawgs/node-unrtf/issues/81).\n\u003e It is recommended that whatever application is using the `node-unrtf` module is run in a Linux environment using the latest\n\u003e available UnRTF binaries, which do not have these bugs.\n\n# node-unrtf\n\n[![GitHub release](https://img.shields.io/github/release/Fdawgs/node-unrtf.svg)](https://github.com/Fdawgs/node-unrtf/releases/latest/)\n[![npm version](https://img.shields.io/npm/v/node-unrtf)](https://npmjs.com/package/node-unrtf)\n[![CI](https://github.com/Fdawgs/node-unrtf/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/Fdawgs/node-unrtf/actions/workflows/ci.yml)\n[![Coverage status](https://coveralls.io/repos/github/Fdawgs/node-unrtf/badge.svg?branch=main)](https://coveralls.io/github/Fdawgs/node-unrtf?branch=main)\n[![code style: Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat)](https://github.com/prettier/prettier)\n\n\u003e Asynchronous Node.js wrapper for the UnRTF RTF conversion program\n\n## Overview\n\nUnRTF is a CLI program that allows for the manipulation and extraction of data from RTF documents such as converting RTF files to HTML or TXT.\n\nThe `node-unrtf` module provides an asynchronous Node.js wrapper around said CLI program for easier use.\n\n## Installation\n\nInstall using `npm`:\n\n```bash\nnpm i node-unrtf\n```\n\n### Linux and macOS/Darwin support\n\nFor Linux and Mac users, the `unrtf` binary will need to be installed separately.\n\nAn example of downloading the binary on a Debian system:\n\n```\nsudo apt-get install unrtf\n```\n\nFor macOS, the binary can be installed with [Homebrew](https://brew.sh/):\n\n```\nbrew install unrtf\n```\n\n## Example usage\n\nPlease refer to the [JSDoc comments in the source code](./src/index.js) or the [generated type definitions](https://www.npmjs.com/package/node-unrtf?activeTab=code) for information on the available options.\n\n### Async Await\n\nExample of an `async` `await` call to convert an RTF file to HTML in an ESM environment:\n\n```js\nimport { UnRTF } from \"node-unrtf\";\n\nconst file = \"test_document.rtf\";\nconst unRtf = new UnRTF();\nconst options = {\n\toutputHtml: true,\n};\n\nconst res = await unRtf.convert(file, options);\nconsole.log(res);\n```\n\n### Promise chaining\n\nExample of calling unRTF.convert with a promise chain in a CJS environment:\n\n```js\nconst { UnRTF } = require(\"node-unrtf\");\n\nconst file = \"test_document.rtf\";\nconst unRtf = new UnRTF(\"/usr/bin\");\nconst options = {\n\toutputHtml: true,\n};\n\nunRTF\n\t.convert(file, options)\n\t.then((res) =\u003e {\n\t\tconsole.log(res);\n\t\treturn res;\n\t})\n\t.catch((err) =\u003e {\n\t\tconsole.error(err);\n\t\tthrow err;\n\t});\n```\n\n### Removing images generated by UnRTF\n\nAs mentioned in the note block at the top of this README, the `noPictures` option does not remove images\nwhen used with UnRTF \u003c v0.20.4 and will write them to the current working directory.\nTo remove images generated by UnRTF it is recommended to use a globbing module such as [glob](https://www.npmjs.com/package/glob) in conjunction with the `node:fs/promises` module to find and remove them:\n\n```js\nimport { unlink } from \"node:fs/promises\";\nimport { UnRTF } from \"node-unrtf\";\nimport { glob } from \"glob\";\n\nconst file = \"test/files/test-rtf-complex.rtf\";\nconst unRtf = new UnRTF();\nconst options = {\n\toutputHtml: true,\n\tnoPictures: true,\n};\n\nawait unRtf.convert(file, options);\n\nconst files = await glob(\"*.{emf,wmf}\");\nawait Promise.all(files.map((filed) =\u003e unlink(filed)));\n```\n\n## Contributing\n\nContributions are welcome, and any help is greatly appreciated!\n\nSee [the contributing guide](https://github.com/Fdawgs/.github/blob/main/CONTRIBUTING.md) for details on how to get started.\nPlease adhere to this project's [Code of Conduct](https://github.com/Fdawgs/.github/blob/main/CODE_OF_CONDUCT.md) when contributing.\n\n## License\n\n`node-unrtf` is licensed under the [MIT](./LICENSE) license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffdawgs%2Fnode-unrtf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffdawgs%2Fnode-unrtf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffdawgs%2Fnode-unrtf/lists"}