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 Fill form not working - PDFTK (2.02) Mac OS (10.11.4) & Cent OS 7 #30

Closed
bhushangahire opened this issue Jul 29, 2015 · 22 comments
Closed

Comments

@bhushangahire
Copy link

Is there any issues with PDF form or I am doing something wrong?
I am using Mac on El Capitan

PdfForms::PdftkError - failed to fill form with command
"/usr/local/bin/pdftk" "/Users/bahire/Documents/NetbeansProjects/onboarding/lib/pdf_templates/IBC Resale Certificates.pdf" fill_form "/var/folders/7w/b15y7t8j6010_x6hkw53h93mzjc4qr/T/pdf_forms-fdf20150729-65729-13927kb" output "/Users/bahire/Documents/NetbeansProjects/onboarding/tmp/pdfs/IBC Resale Certificates_filled.pdf" flatten 2>&1
command output was:

failing form data has been saved to /var/folders/7w/b15y7t8j6010_x6hkw53h93mzjc4qr/T/20150729162322.fdf:

@jkraemer
Copy link
Owner

To diagnose this, could you take the generated fdf file (from the 'failing form data has been saved to' line) and

  • make sure it isn't empty
  • try to fill your form directly calling pdftk on the command line:

/usr/local/bin/pdftk path_to_your_form.pdf fill_form path_to_form_data.fdf output result.pdf

@bl1nk
Copy link

bl1nk commented Aug 27, 2015

Running into the same problem now. The generated .fdf has all field data I wanted to fill, form filling just does not happen. Appending verbose to the command also does not print any output, the process is stuck doing nothing.

I'm running pdftk 2.02 on OS X 10.11 Beta (15A262e)

@jkraemer
Copy link
Owner

Does that mean even the command line from my comment above does not fill the form? I have just tried and on Yosemite with pdftk 2.02 it works like a charm. So might be a pdftk/OSX beta issue.

One other thing to try would be using XFDF instead of FDF - for that to happen pass data_format: 'Xfdf' to the initializer.

@aadamsx
Copy link

aadamsx commented Sep 8, 2015

I've been doing form fills with pdftk for a while now, and prior to 10.11 beta everything was fine. Once I installed the beta I can't execute anything from command line (or in my application -- it just hangs. There's an issue with the beta. I've filed a issue but no response from Apple. I can run the same commands from my windows box and everything is fine too. I'm not sure what's going on.

@bhushangahire
Copy link
Author

Is there any logs I can give to make this work? Can I have PDFTK on virtual windows and fill from there ?

@aadamsx
Copy link

aadamsx commented Sep 16, 2015

Yes, PDFtk on windows works of course. And PDFtk still works on OS X 10.10. I have a virtual windows box running and do my form fill testing there since upgrading to 10.11 beta. I have a Stack Overflow question on PDFtk and OS X 10.11 that describes what I've done so far: http://stackoverflow.com/questions/32505951/pdftk-server-on-os-x-10-11

Just to be clear, NO PDFtk commands work on OS X 10.11. The executable in the terminal will just hang indefinitely. It doesn't matter what files or file types you use, what PDFtk commands you try -- nothing will work right now.

@ghost
Copy link

ghost commented Sep 21, 2015

I have been having the same issue with fill_form, however generate_fdf seems to work fine now (was having a problem with it hanging). I have 10.11 public beta.

fill_form "works", as it does create a pdf, but it doesn't actually fill it out.

@nerdinand
Copy link

It seems like PDFtk generally has problems with OS X 10.11 (El Capitan): http://stackoverflow.com/questions/32505951/pdftk-server-on-os-x-10-11

@agileapplications
Copy link

@nerdinand Yes I ran into the same issue!

@bhushangahire
Copy link
Author

@ghost202 fill_form doenst work for me. It stucks at command and nothing happens.

@bhushangahire
Copy link
Author

Those who are getting issues for PDFTK on El Capitan please read below updates. Worked for me.


Thank you for your patience. I have successfully tested this pdftk installer and binary on OS X 10.11, El Capitan:
https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk_server-2.02-mac_osx-10.11-setup.pkg
I will update our PDF Labs site soon to reflect this update.
If you already have pdftk installed from the old installer, this should install right on top of it without a problem -- it shouldn't be necessary to remove the old pdftk before installing this one.
Note that this installer/binary has not yet been tested on older versions of OS X.
Please let me know how this works for you.
I want to thank Aaron for opening this thread and for bringing helpful attention to the problem we were having with the build tools. I also want to thank the MacPorts team for their professional and timely work!

Best Regards-
Sid Steward, PDF Labs

@aadamsx
Copy link

aadamsx commented Oct 22, 2015

@bhushangahire
Copy link
Author

The solution I have updated on ticket is same and I just tested and now its working. Its a lifesaver. :)

@AdamBrodzinski
Copy link

I'm still having this issue with the latest binary on the website. I can confirm that the OSX downloader on the website does not work but the above linked 10.11 binary does work great.

Should this be included in the downloads page?

@jkraemer
Copy link
Owner

you're right, I added it to the installation section of the readme.

@bhushangahire
Copy link
Author

I am getting same issue with the OS-X 10.11.4. Its working with 10.11.5 - beta version. I am trying installing PDFTK with brew to check if that makes any difference.
Anyone here with the same issue?

@AdamBrodzinski
Copy link

@bhushangahire I just checked and i'm getting the same hanging issue with 10.11.4. I can't remember when I upgraded. I'm also using the last release in the above 10.11 URL from a while back. In the mean time I might just run it in an Ubuntu VM for development.

@bhushangahire
Copy link
Author

Yes I am doing the same now. Setting up the Vagrant for dev env. One of my Mac is on 10.11.5 Beta which works.

@bhushangahire bhushangahire reopened this Apr 18, 2016
@bhushangahire bhushangahire changed the title PDFTK Fill form not working PDFTK Fill form not working - PDFTK (2.02) Mac OS (10.11.4) Apr 18, 2016
@AdamBrodzinski
Copy link

Oh nice! I'll just wait it out then 😄 Thanks! 👍

@bhushangahire
Copy link
Author

bhushangahire commented Apr 18, 2016

https://github.com/bhushangahire/vagrant-centos-rails-passenger

On this Vagrant setup I got the PDFTK working. Still no luck on 10.11.4

@bhushangahire bhushangahire changed the title PDFTK Fill form not working - PDFTK (2.02) Mac OS (10.11.4) PDFTK Fill form not working - PDFTK (2.02) Mac OS (10.11.4) & Cent OS 7 Apr 22, 2016
@bhushangahire
Copy link
Author

I recently found out that its also not working on CentOS7 version. But works on Cent OS 6

@jkraemer
Copy link
Owner

jkraemer commented May 1, 2016

nothing this gem can do anything about. Please refer to pdflabs.com for supported operating systems and instructions about how to build from source. Or use a Linux distribution that provides a working pdftk package (Debian is known to work).

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

No branches or pull requests

7 participants