{"id":15998259,"url":"https://github.com/yushulx/docscan4nodejs","last_synced_at":"2025-08-02T01:33:55.152Z","repository":{"id":193004822,"uuid":"687881755","full_name":"yushulx/docscan4nodejs","owner":"yushulx","description":"Node.js wrapper for Dynamsoft Service, supporting document scanning from TWAIN, WIA, ICA, SANE and eSCL scanners.","archived":false,"fork":false,"pushed_at":"2023-12-15T03:25:57.000Z","size":72,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-08T08:08:12.493Z","etag":null,"topics":["document","escl","ica","sane","scanner","twain","wia"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/docscan4nodejs","language":"JavaScript","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/yushulx.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":"2023-09-06T07:47:34.000Z","updated_at":"2024-08-30T07:37:32.000Z","dependencies_parsed_at":"2023-12-15T04:30:17.341Z","dependency_job_id":"1d672386-a515-4727-a656-e499dc6cea3d","html_url":"https://github.com/yushulx/docscan4nodejs","commit_stats":null,"previous_names":["yushulx/dynamsoft-service-rest-api","yushulx/docscan4nodejs"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yushulx%2Fdocscan4nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yushulx%2Fdocscan4nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yushulx%2Fdocscan4nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yushulx%2Fdocscan4nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yushulx","download_url":"https://codeload.github.com/yushulx/docscan4nodejs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247271528,"owners_count":20911587,"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":["document","escl","ica","sane","scanner","twain","wia"],"created_at":"2024-10-08T08:08:19.728Z","updated_at":"2025-04-05T01:10:47.476Z","avatar_url":"https://github.com/yushulx.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Document Scanner SDK for Node.js\n\nThe package provides Node.js APIs for invoking the **Dynamic Web TWAIN Service REST API**. It helps developers create **desktop** or **server-side** document scanning and processing applications with ease.\n\n---\n\n## 🚀 Key Features\n\n- 🖨️ **Multi-Driver Support**\n  - TWAIN (32-bit \u0026 64-bit)\n  - WIA (Windows Image Acquisition)\n  - SANE (Scanner Access Now Easy)\n  - ICA (Image Capture Architecture)\n  - eSCL (AirScan/Mopria)\n  - Wi-Fi Direct\n\n- 🌐 **Cross-Platform Compatibility**\n  - Windows 7+\n  - macOS 10.15+\n  - Linux (x64 / ARM64 / MIPS64)\n\n---\n\n## ⚙️ Prerequisites\n\n### ✅ Install Dynamic Web TWAIN Service:\n\n- **Windows**: [Dynamsoft-Service-Setup.msi](https://demo.dynamsoft.com/DWT/DWTResources/dist/DynamsoftServiceSetup.msi)\n- **macOS**: [Dynamsoft-Service-Setup.pkg](https://demo.dynamsoft.com/DWT/DWTResources/dist/DynamsoftServiceSetup.pkg)\n- **Linux**:\n  - [Dynamsoft-Service-Setup.deb](https://demo.dynamsoft.com/DWT/DWTResources/dist/DynamsoftServiceSetup.deb)\n  - [Dynamsoft-Service-Setup-arm64.deb](https://demo.dynamsoft.com/DWT/DWTResources/dist/DynamsoftServiceSetup-arm64.deb)\n  - [Dynamsoft-Service-Setup-mips64el.deb](https://demo.dynamsoft.com/DWT/DWTResources/dist/DynamsoftServiceSetup-mips64el.deb)\n  - [Dynamsoft-Service-Setup.rpm](https://demo.dynamsoft.com/DWT/DWTResources/dist/DynamsoftServiceSetup.rpm)\n\n### 🔑 Get a License\n\nRequest a [free trial license](https://www.dynamsoft.com/customer/license/trialLicense/?product=dcv\u0026package=cross-platform) for the Dynamic Web TWAIN Service.\n\n---\n\n## 🧩 Configuration\n\nAfter installation, open `http://127.0.0.1:18625/` in your browser to configure the **host** and **port** settings.\n\n\u003e By default, the service is bound to `127.0.0.1`. To access it across the LAN, change the host to your local IP (e.g., `192.168.8.72`).\n\n![dynamsoft-service-config](https://github.com/yushulx/dynamsoft-service-REST-API/assets/2202306/e2b1292e-dfbd-4821-bf41-70e2847dd51e)\n\n---\n\n## 📡 REST API Endpoints\n\n[https://www.dynamsoft.com/web-twain/docs/info/api/restful.html](https://www.dynamsoft.com/web-twain/docs/info/api/restful.html)\n\n## 📦 Node.js APIs\n\n### 🔍 Scanner APIs\n\n- `getDevices(host, scannerType)`  \n  Get available scanners. Returns an array of devices.\n\n- `createJob(host, parameters)`  \n  Create a new scan job. Returns a job object.\n\n- `checkJob(host, jobId)`  \n  Check job status (e.g., running, canceled, etc.)\n\n- `deleteJob(host, jobId)`  \n  Delete a scan job and terminate scanning.\n\n- `updateJob(host, jobId, parameters)`  \n  Update job status (e.g., cancel a running job).\n\n- `getScannerCapabilities(host, jobId)`  \n  Get scanner capabilities like resolution, color modes.\n\n### 🖼️ Image Retrieval\n\n- `getImageFile(host, jobId, directory)`  \n  Fetch one image and save to local disk.\n\n- `getImageFiles(host, jobId, directory)`  \n  Fetch all images for a job and save to local disk.\n\n- `getImageStream(host, jobId)`  \n  Fetch one image as a readable stream.\n\n- `getImageStreams(host, jobId)`  \n  Fetch all images as streams.\n\n- `getImageInfo(host, jobId)`  \n  Retrieve metadata of the next page.\n\n### 📄 Document APIs\n\n- `createDocument(host, parameters)`  \n  Create a new empty document (PDF).\n\n- `getDocumentInfo(host, docId)`  \n  Get document metadata and structure.\n\n- `deleteDocument(host, docId)`  \n  Delete an existing document.\n\n- `getDocumentFile(host, docId, directory)`  \n  Download the document and save as a PDF.\n\n- `getDocumentStream(host, docId)`  \n  Download document as a stream.\n\n- `insertPage(host, docId, parameters)`  \n  Insert a new page into an existing document.\n\n- `deletePage(host, docId, pageId)`  \n  Remove a page from an existing document.\n\n---\n\n## ⚙️ Scan Job Parameters\n\nThe configuration follows [Dynamsoft Web TWAIN DeviceConfiguration](https://www.dynamsoft.com/web-twain/docs/info/api/Interfaces.html#DeviceConfiguration).\n\n```js\nlet parameters = {\n  license: \"LICENSE-KEY\",\n  device: devices[0].device,\n  config: {\n    IfShowUI: false,\n    PixelType: 2, // Color\n    Resolution: 200,\n    IfFeederEnabled: false,\n    IfDuplexEnabled: false\n  }\n};\n```\n\n---\n\n## 🧪 Examples\n\nSet the `LICENSE-KEY` before running the examples.\n\n### 🖥️ Command-line App\n\n- [Command-line Example](https://github.com/yushulx/dynamsoft-service-REST-API/tree/main/examples/command-line)\n\n  - Discover devices  \n    ![image](https://github.com/yushulx/dynamsoft-service-REST-API/assets/2202306/24fcb45d-1bea-45ba-9569-b9a2ef377b63)\n\n  - Scan and save documents  \n    ![image](https://github.com/yushulx/dynamsoft-service-REST-API/assets/2202306/2688269d-4f05-4734-bf1c-7ba4e2638d66)\n\n### 🌐 Web Server App\n\n- [Web Server Example](https://github.com/yushulx/dynamsoft-service-REST-API/tree/main/examples/web)\n\n  ![server-side-document-scan](https://github.com/yushulx/dynamsoft-service-REST-API/assets/2202306/9a161dda-6f9d-473b-a2d4-168ebd5f6b0b)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyushulx%2Fdocscan4nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyushulx%2Fdocscan4nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyushulx%2Fdocscan4nodejs/lists"}