Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pdftk does not like multiple character handles #1

Open
wesnick opened this issue Jun 19, 2013 · 3 comments · May be fixed by #5
Open

pdftk does not like multiple character handles #1

wesnick opened this issue Jun 19, 2013 · 3 comments · May be fixed by #5

Comments

@wesnick
Copy link

wesnick commented Jun 19, 2013

Using pdftk 1.44, it seems to balk with two letter handles. A sample dump data fields command that fails.

/usr/bin/pdftk AA=my/pdf.pdf dump_data_fields output /tmp/out.txt

The documentation for pdftk indicates they should only be one letter:

"Input files can be associated with handles, where a handle is a single, upper-case letter"

@baikunz
Copy link
Owner

baikunz commented Jun 20, 2013

Thank you for pointing that out, I'll try to fix this issue asap, however i'm quite busy right now so feel free to contribute!

@wesnick
Copy link
Author

wesnick commented Jun 22, 2013

The newer version of pdftk, 2+, allows multiple letter handles. Since most versions of pdftk installed with package managers will have older versions, perhaps the factory constructor should have an optional second parameter, version? Then the specifically affected methods can provide functionality for different versions.

    // Create a new factory instance, give it your path to pdftk binary
    // You can optionally add the pdftk version of your binary if you are not using the most recent version
    $factory = new \Shuble\Slurpy\Factory('/path/to/pdftk', '1.44');

j-d referenced this issue in arkschools/Slurpy Jul 5, 2013
keep compatibility with previous version of pdftk
@rredpoppy
Copy link

Thank you for this. You should add the option to the documentation as well. By the way, excellent wrapper!

@z38 z38 linked a pull request Apr 2, 2014 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants