Giter Site home page Giter Site logo

Comments (4)

kwmartin avatar kwmartin commented on September 6, 2024

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.

kwmartin avatar kwmartin commented on September 6, 2024

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.

kwmartin avatar kwmartin commented on September 6, 2024

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.

MartinThoma avatar MartinThoma commented on September 6, 2024

Here are your options:

  1. Downgrade to PyPDF2<3.0.0
  2. Upgrade your code (replace PdfFileReader by PdfReader; potentially more); see #17
  3. Replace PyPDF2 by pypdf + step (2)

from pdftools.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.