Comments (3)
I apologize for the imperfections in our English documentation. In the future, we will continue to focus on providing convenience for users of multiple languages.
Below is the solution to your request:
Objective: Use CLI to add a PDF document task and generate a double-layer searchable PDF.
This task is not within the preset quick commands, so it is relatively cumbersome and requires multiple consecutive commands to achieve.
Procedure:
-
(Optional) If the
Batch Documents OCR
tab is not currently open, open it:- 1.1. Query all current page templates:
./umi-ocr --all_pages
- 1.2. It is known that the template_index of the
BatchDOC
tab is3
. Create this tab:
./umi-ocr --add_page 3
- 1.3. Check if the
BatchDOC
module already exists:
./umi-ocr --all_modules
- If
BatchDOC_1
is found inQml modules
, then it is correct.
-
Input the paths of multiple documents into the software:
- Suppose you want to add the following files:
C:\Users\My\Desktop\111.epub C:\Users\My\Desktop\222.pdf
- Use the following command to input the document paths (the
\
in the path needs to be changed to/
):
./umi-ocr --call_qml BatchDOC --func addDocs '[\"C:/Users/My/Desktop/111.epub\",\"C:/Users/My/Desktop/222.pdf\"]'
- Note that the format of the
addDocs
parameter is:'[\"document path\",\"document path\"...]'
. Also, backticks\
cannot be used in the path;/
must be used instead.
-
Start the task:
./umi-ocr --call_qml BatchDOC --func docStart
- Currently, it is not possible to change the file type to be saved via CLI (the default is layered.pdf Double-layer Searchable Document). To add other save types, you must check them in the software interface.
from umi-ocr.
./umi-ocr --call_qml BatchDOC --func docStart
Thank you for the quick response and detailed step-by-step instructions! Problem solved! With your help I was able to process the documents despite having experienced some difficulties when using a more recent version of PowerShell (version 7.4.2); so to make it work I have to run the commands using Windows PowerShell version 5.1.22621.2506 (the default version preinstalled on Windows 11). If you are curious, please see how I proceeded below:
-
Initially, when running the commands as directed using PowerShell version 7.4.2, only the following commands appear to execute correctly: ".\Umi-OCR.exe --all_pages" and ".\Umi-OCR.exe --add_page 3". The above commands launch the application and open the Batch Documents OCR page respectively.
-
After running the previous commands using PowerShell version 7.4.2 the following commands DO NOT run or DO NOT appear to run: ".\Umi-OCR.exe --call_qml BatchDOC --func addDocs '["C:/Users /account/Downloads/example.pdf"]'" and ".\Umi-OCR.exe --call_qml BatchDOC --func docStart". Although they do not execute effectively the message 'Calling "docStart" in main thread.' is returned as if something where happening, but I can't see any CPU stress or memory usage and no document is created.
After failing to execute several attempts using the previous commands, I realized I was using the Windows Terminal which in turn was launching PowerShell (version 7.4.2); So, I tried launching the same commands in the same order however this time using Windows PowerShell version 5.1.22621.2506 and luckily everything worked correctly!
Thank you for your help! You're doing an awesome job and making my life easier so please wait for me to buy you some coffees or provide you with any help here if you need! Much love and affection from your friend in Brazil
from umi-ocr.
commands DO NOT run or DO NOT appear to run
This issue is most likely caused by incorrect parsing of double quotes "
by Windows PowerShell. Additionally, the parsing rules differ between PowerShell and Terminal, resulting in different formats for the paths array that we need to input:
- In PowerShell, the outermost layer of the array should be enclosed in single quotes
'
, and there must be a space before each double quote. That is:addDocs '[■\"path_1\",■\"path_2\",■\"path_3\"]'
(replace■
with a space - In Terminal, the outermost layer of the array should be enclosed in double quotes
"
. That is:addDocs "[\"path_1\",\"path_2\",\"path_3\"]"
.
The above commands have been tested and work on the latest Windows 11. There may be slight differences in other versions of the system.
Microsoft make something as simple as quoting strings a convoluted mess. 😂
from umi-ocr.
Related Issues (20)
- 没有问题了
- Rapid http接口怎么提高认识率? HOT 3
- umi程序作为api调用过程中出现:PaddleOCR-json.exe-应用程序错误 HOT 2
- 自动截图 HOT 1
- win arm版本点击exe无反应 HOT 10
- 能否像python库一样引入umiOrc的功能 HOT 1
- 关于can't find python3.dll和任务异常弹窗后软件无法操作的问题 HOT 2
- 谢谢这么好用的Umi,强烈请求加入罗马数字等特别字符识别! HOT 1
- 多显示器截图不准确 HOT 1
- 小学教材orc出错 HOT 3
- HTTP过几天后接口无响应,不知道是不是卡死,只能重启! HOT 1
- 建议:在识别结果文本中,增加未识别图片占位符! HOT 6
- UMI-OCR V2.1.2 needs more funciton HOT 2
- 【安卓】可否集成到安卓上,在移动端非常需要!armv7、arm64、x86、x86_64,飞桨官方的只有arm,但考虑到很多机器CPU无法转义执行,建议所有abi都支持一下 HOT 1
- 能否增加一个选项,截图时屏幕是否变暗 HOT 2
- 跪求linux命令行版 HOT 2
- Performance issue over HTTP HOT 6
- 跪求支持韓文OCR功能! HOT 3
- 全新部署的WIN10 LTSC 2021系统上启动报错:Cannot load python3.dll HOT 2
- 最新的2.12版本http调用图片base64 ocr 返回为什么不是正常的json 会有换行符的存在破坏掉json格式 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from umi-ocr.