# harmonyos-document-scanner **Repository Path**: yushulx/harmonyos-document-scanner ## Basic Information - **Project Name**: harmonyos-document-scanner - **Description**: 鸿蒙HarmonyOS小工具:用来获取办公室里连接PC的扫描仪,把文档扫描到手机里 - **Primary Language**: TypeScript - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-10-19 - **Last Updated**: 2023-10-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 鸿蒙应用:文档扫描 华为鸿蒙HarmonyOS小工具,用来获取办公室里连接PC的扫描仪,把文档扫描到手机里。 ## 准备工作 1. 在连接着扫描仪的电脑上安装Dynamsoft Service。 - Windows: [Dynamsoft-Service-Setup.msi](https://demo.dynamsoft.com/DWT/DWTResources/dist/DynamsoftServiceSetup.msi) - macOS: [Dynamsoft-Service-Setup.pkg](https://demo.dynamsoft.com/DWT/DWTResources/dist/DynamsoftServiceSetup.pkg) - Linux: - [Dynamsoft-Service-Setup.deb](https://demo.dynamsoft.com/DWT/DWTResources/dist/DynamsoftServiceSetup.deb) - [Dynamsoft-Service-Setup-arm64.deb](https://demo.dynamsoft.com/DWT/DWTResources/dist/DynamsoftServiceSetup-arm64.deb) - [Dynamsoft-Service-Setup-mips64el.deb](https://demo.dynamsoft.com/DWT/DWTResources/dist/DynamsoftServiceSetup-mips64el.deb) - [Dynamsoft-Service-Setup.rpm](https://demo.dynamsoft.com/DWT/DWTResources/dist/DynamsoftServiceSetup.rpm) 然后访问`http://127.0.0.1:18622/DWTAPI/Scanners`。正常安装可以获取到扫描仪列表。 ![dynamsoft-service-scanners](https://devblogs.damingsoft.com/album/2023/10/dynamsoft-service-scanner-list.png) 2. 在浏览器中打开`http://127.0.0.1:18625/`,把**host**从`127.0.0.1`改成PC的局域网IP地址。比如`192.168.8.72`,修改成功可以通过局域网IP地址访问`192.168.8.72:18622/DWTAPI/Scanners`获取到扫描仪列表。 ![dynamsoft-service-config](https://user-images.githubusercontent.com/2202306/266243200-e2b1292e-dfbd-4821-bf41-70e2847dd51e.png) 3. 申请一个[免费试用序列号](https://www.dynamsoft.com/customer/license/trialLicense?product=dwt)。 ## 运行方法 1. 把工程导入到**DevEco Studio**。 2. 打开`entry/src/main/etc/pages/Index.ets`替换序列号: ```typescript licenseKey: string = "LICENSE-KEY"; // https://www.dynamsoft.com/customer/license/trialLicense?product=dwt ``` 3. 替换局域网IP地址: ```typescript host: string = 'http://192.168.8.72:18622' ``` 4. 运行工程。 ![鸿蒙文档扫描](https://devblogs.damingsoft.com/album/2023/10/harmonyos-document-scanner.png)