{"id":23336065,"url":"https://github.com/yuiseki/pdfjs2png","last_synced_at":"2025-08-04T06:16:44.274Z","repository":{"id":66605877,"uuid":"446295003","full_name":"yuiseki/pdfjs2png","owner":"yuiseki","description":"Simple CLI tool and npm package convert PDF file into png images with pdf.js and node-canvas","archived":false,"fork":false,"pushed_at":"2025-07-29T21:02:37.000Z","size":275,"stargazers_count":3,"open_issues_count":6,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-29T23:48:14.218Z","etag":null,"topics":["cli","nodejs","npm","npm-package","pdf","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yuiseki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2022-01-10T05:43:31.000Z","updated_at":"2025-05-14T22:55:54.000Z","dependencies_parsed_at":"2024-01-29T01:56:50.537Z","dependency_job_id":"b7bd7477-8064-44c2-958e-46b5e5c45b32","html_url":"https://github.com/yuiseki/pdfjs2png","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yuiseki/pdfjs2png","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuiseki%2Fpdfjs2png","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuiseki%2Fpdfjs2png/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuiseki%2Fpdfjs2png/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuiseki%2Fpdfjs2png/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yuiseki","download_url":"https://codeload.github.com/yuiseki/pdfjs2png/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuiseki%2Fpdfjs2png/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268657587,"owners_count":24285532,"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-08-04T02:00:09.867Z","response_time":79,"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":["cli","nodejs","npm","npm-package","pdf","typescript"],"created_at":"2024-12-21T02:11:56.257Z","updated_at":"2025-08-04T06:16:44.223Z","avatar_url":"https://github.com/yuiseki.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pdfjs2png - Simple CLI tool and npm package convert PDF file into png images with pdf.js and node-canvas\n\n## Install\n\nIf you want to use pdfjs2png as command, install with `-g` option.\n\n```bash\nnpm i -g pdfjs2png\n```\n\nOr if you want to use pdfjs2png as npm package in your Node.js project, just install.\n\n```bash\nnpm i pdfjs2png\n```\n\n## Basic Usage as command\n\nYou can use `pdfjs2png` command if you have install with `-g` option.\n\nThe following command:\n\n```bash\npdfjs2png test/helloworld.pdf\n```\n\nwill output tmp file path of converted images to stdout:\n\n```bash\n/tmp/helloworld_pdf_page_1.png\n```\n\n### Advanced usage\n\n`pdfjs2png` command supports multiple CLI arguments and stdin.\n\nTry below commands:\n\n```bash\necho test/helloworld.pdf test/20211026_news_gov_cloud_01.pdf | xargs pdfjs2png\ncat test/helloworld.pdf | pdfjs2png -i\n```\n\n## Basic Usage as package\n\n```typescript\nimport path from \"path\";\nimport { promises as fs } from \"fs\";\nimport { pdfjs2png } from \"pdfjs2png\";\n\nconst filename = path.basename(filepath);\nconst fileBuffer = await fs.readFile(filepath);\nconst results = await pdfjs2png(fileBuffer, filename);\n// results is an array of string of tmp file path of PDF pages.\nconsole.log(results);\n```\n\n## Development\n\n```bash\nnpm ci\nnpm run build\nnpm link\nNODE_ENV=development pdfjs2png test/helloworld.pdf\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuiseki%2Fpdfjs2png","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuiseki%2Fpdfjs2png","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuiseki%2Fpdfjs2png/lists"}