Git Product home page Git Product logo

Comments (3)

revolunet avatar revolunet commented on August 25, 2024

Looks like pdftk binary is not installed on your system

You have to have pdftk.exe installed and define the environnement variable PDFTK_PATH to point to it so the library can find it (see https://github.com/revolunet/pypdftk/blob/master/pypdftk.py#L15)

from pypdftk.

mertz3hack avatar mertz3hack commented on August 25, 2024

Okay it may not have since I installed via pip

@revolunet any idea about this error I got after installing pdftk
Traceback (most recent call last):
File "C:\freeopcua\examples\40T.py", line 41, in
mypath = pypdftk.get_num_pages(thispath)
File "C:\Python34\lib\site-packages\pypdftk.py", line 43, in get_num_pages
for line in run_command([PDFTK_PATH, pdf_path, 'dump_data']):
File "C:\Python34\lib\site-packages\pypdftk.py", line 38, in run_command
return p.split('\n')
TypeError: Type str doesn't support the buffer API

-----Original Message-----
From: "Julien Bouquillon" [email protected]
Sent: ‎3/‎3/‎2016 12:17
To: "revolunet/pypdftk" [email protected]
Cc: "mertz3hack" [email protected]
Subject: Re: [pypdftk] Examples (#7)

Looks like pdftk binary is not installed on your system
You have to have pdftk.exe installed and define the environnement variable PDFTK_PATH to point to it so the library can find it (see https://github.com/revolunet/pypdftk/blob/master/pypdftk.py#L15)

Reply to this email directly or view it on GitHub.

from pypdftk.

iurisilvio avatar iurisilvio commented on August 25, 2024

I think it must fail with a better message.

Maybe check if the executable exist. Calling PDFTK_PATH without parameters exit the process with exit_code=0, but it fails if pdftk is not there.

from pypdftk.

Related Issues (20)

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.