Comments (4)
I have the same problem
`
pdftools copy -p 208-209 dest.pdf sob_master_20221201.pdf
usage: pdftools copy [-h] [-o OUTPUT] [-p PAGES [PAGES ...]] [-y] src
pdftools copy: error: the following arguments are required: src
and
pdftools copy -o tmp.pdf -p 208-209 sob_master_20221201.pdf
usage: pdftools copy [-h] [-o OUTPUT] [-p PAGES [PAGES ...]] [-y] src
pdftools copy: error: the following arguments are required: src
`
from pdftools.
Looked into it a bit. 1) when using copy there is no dest, 2) the way the argument parser is written, the src file must be before the "flag" arguments., and 2) on line 266 of the version that comes in with pip, we have:
pdf_copy(ARGS.input, ARGS.output, ARGS.pages, ARGS.y)
as compared to the repo which has
pdf_add(ARGS.dest, ARGS.src, ARGS.pages, ARGS.output)
. ARGS which is 'Namespace' object has no attribute 'input'. Basically, not currently useable at least with the version coming in with pip
from pdftools.
Did a pip uninstall, cloned repo, did a sudo python3 setup.py install which worked. Tried running and got:
PyPDF2.errors.DeprecationError: PdfFileReader is deprecated and was removed in PyPDF2 3.0.0. Use PdfReader instead.
Oh well! I guess you get what you pay for?
from pdftools.
Here are your options:
- Downgrade to
PyPDF2<3.0.0
- Upgrade your code (replace
PdfFileReader
byPdfReader
; potentially more); see #17 - Replace
PyPDF2
bypypdf
+ step (2)
from pdftools.
Related Issues (12)
- ValueError: invalid literal for int() with base 10: b'' HOT 4
- Reorder booklet HOT 5
- Consider use a universal endline: Unix HOT 6
- Broken executables in a virtual environment? HOT 3
- Syntax error during installation process HOT 3
- pdftools copy uses non-existing ARGS.input
- pdftools merge fails for some PDFs HOT 1
- copy crashes with AttributeError
- Update to latest PyPDF2 HOT 1
- PyPDF2 dependency error
- easy fixes for PyPDF2 3.0.0 support
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 pdftools.