Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

pdf2txt error in command line cannot match the files argument #252

Open
udaykapur opened this issue Aug 29, 2019 · 10 comments
Open

pdf2txt error in command line cannot match the files argument #252

udaykapur opened this issue Aug 29, 2019 · 10 comments

Comments

@udaykapur
Copy link

#164 This issue still remains unresolved on Win10 - python 3.7.1

Has someone found a solution yet?

@noopur2805
Copy link

Try replacing file() function with open() and write output file in bytes with 'wb'.

@AyeshaSarwar
Copy link

Hi
I ran into the same problem. Can you help me telling how did you resolve this issue.
Reference
#164
Thanks

@AyeshaSarwar
Copy link

it always says required argument files
I am using this syntax
pdf2txt.py "D:\test.pdf"
also tried
pdf2txt.py -c utf-8 "D:\test.pdf"

@AyeshaSarwar
Copy link

python 3.8.1
windows10

@noopur2805
Copy link

it always says required argument files
I am using this syntax
pdf2txt.py "D:\test.pdf"
also tried
pdf2txt.py -c utf-8 "D:\test.pdf"

Getting error even after the above mentioned changes?

@AyeshaSarwar
Copy link

Yes, it runs from administrative power shell but not from command prompt on windows

@AyeshaSarwar
Copy link

C:\Users\Ayesha>pdf2txt.py D:/test.pdf
usage: pdf2txt.py [-h] [--debug] [--disable-caching] [--page-numbers PAGE_NUMBERS [PAGE_NUMBERS ...]]
[--pagenos PAGENOS] [--maxpages MAXPAGES] [--password PASSWORD] [--rotation ROTATION]
[--no-laparams] [--detect-vertical] [--char-margin CHAR_MARGIN] [--word-margin WORD_MARGIN]
[--line-margin LINE_MARGIN] [--boxes-flow BOXES_FLOW] [--all-texts] [--outfile OUTFILE]
[--output_type OUTPUT_TYPE] [--codec CODEC] [--output-dir OUTPUT_DIR] [--layoutmode LAYOUTMODE]
[--scale SCALE] [--strip-control]
files [files ...]
pdf2txt.py: error: the following arguments are required: files

@AyeshaSarwar
Copy link

Power Shell Output

PS D:\EducAtiOn\Thesis\Tasks\2\Parsr> pdf2txt.py D:/simple1.pdf
Hello

World

Hello

World

H e l l o

W o r l d

H e l l o

W o r l d

@AyeshaSarwar
Copy link

It is strange but what do

@noopur2805
Copy link

It is strange but what do

sorry I'm unaware of what might be happening in such case :(

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants