New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unrecognized Arguments Help Text vs --help
Help Text, different output
#402
Comments
I suspect you ran that in two shell contexts that had different |
These are run back to back on the same shell. I installed it for the first time yesterday, so it would also be surprising that I somehow have two different versions installed. |
My install procedure recommends installing the system package (v6.1.2 on Ubuntu 18.04) and then installing the most recent version, because the former ensures you get the non-Python dependencies. The first copy of the help text is clearly v6.1.2. Note one difference in the output. - [--output-type {pdfa,pdf,pdfa-1,pdfa-2}]
+ [--output-type {pdfa,pdf,pdfa-1,pdfa-2,pdfa-3}]
I cannot say how this situation came about, but I can tell you that is v6.1.2. |
You could compare |
That makes a lot of sense. I completely forgot about the old version in the install instructions. I now realize what you meant by Would you be interested in a quick doc PR to the Windows section clarifying this? |
If that's a documented difference for WSL compared to vanilla Ubuntu 18.04 then yes. |
I don't know if "difference" is really the appropriate term, but WSL requires you to set up a new user the first time you run it. This is a user separate from root, but still in the sudoers group. Running these commands on the mounted Windows filesystem, you need higher privileges. I have mostly used *nix on VPSs and such beginning from root. Due to my lack of familiarity with the inner workings of sudo, I didn't realize it actually changed the user the command runs as (and in turn the path). So my intent was just a quick note for Windows users in my situation to avoid the Up to you if you want it or not. Regardless, thanks again for your help. |
I think a procedure along those lines would be helpful. I tried out WSL myself and added some procedure; I found it tricky to get consistent behavior. Feel free to expand it. |
I think your updated procedure makes a lot of sense to me 👍 |
Describe the issue
I am trying to use the
--redo-ocr
argument which notes that it is unrecognized (looks like this was noted in #397). I am on version 8.3.1 so that is kind of odd. So I ran--help
to check if I am using the argument wrong somehow, and I noticed that the argument list is different in--help
and matches what the docs on the website note.To Reproduce
What command line were you trying to run?
running:
returns:
and running:
returns:
usage: ocrmypdf [-h] [-l LANGUAGE] [--image-dpi DPI] [--output-type {pdfa,pdf,pdfa-1,pdfa-2,pdfa-3}] [--sidecar [FILE]] [--version] [-j N] [-q] [-v [VERBOSE]] [--title TITLE] [--author AUTHOR] [--subject SUBJECT] [--keywords KEYWORDS] [-r] [--remove-background] [-d] [-c] [-i] [--unpaper-args UNPAPER_ARGS] [--oversample DPI] [--remove-vectors] [--mask-barcodes] [--threshold] [-f] [-s] [--redo-ocr] [--skip-big MPixels] [-O {0,1,2,3}] [--jpeg-quality Q] [--png-quality Q] [--jbig2-lossy] [--max-image-mpixels MPixels] [--tesseract-config CFG] [--tesseract-pagesegmode PSM] [--tesseract-oem MODE] [--pdf-renderer {auto,hocr,sandwich}] [--tesseract-timeout SECONDS] [--rotate-pages-threshold CONFIDENCE] [--pdfa-image-compression {auto,jpeg,lossless}] [--user-words FILE] [--user-patterns FILE] [-k] [--flowchart FLOWCHART] input_pdf_or_image output_pdf [rest of output removed for clarity]
Expected behavior
--redo-ocr
to not return unrecognized.--help
text to match.System:
The text was updated successfully, but these errors were encountered: