Comments (3)
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.
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.
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)
- pypi release 0.4 HOT 3
- Link Insert using Pypdftk
- Concat function doesn't work HOT 1
- Filename arguments with spaces don't work HOT 4
- Missing values in dump_data_fields() results HOT 1
- More arguments HOT 1
- function to generate pdf chunks HOT 1
- fill_form C:\Users\\AppData\Local\Temp\tmpzgslggq8 output C:\\sreec\AppData\Local\Temp\tmpvqmy0gf2' returned non-zero exit status 1. HOT 2
- Expose dump_data_fields_utf8 ? HOT 2
- Carriage return characters on Windows HOT 4
- Font change
- dump_data_fields does not support multi-line FieldValues HOT 1
- Can we embed image with this also? HOT 1
- Possible update to README.md HOT 2
- Can this be used to select true/false for checkboxes on forms?
- FDF is not properly cleaned up on pdftk errors
- is pypdftk 0.5 compatible with Python 3.9? is CentOS 6 still the latest compatible OS to install binary RPM?
- [background] Is it possible to implement it in the package
- Is it possible to fill_form with specialized fonts? HOT 1
- Image to Stamp
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 pypdftk.