Git Product home page Git Product logo

Comments (5)

Vincent-HD avatar Vincent-HD commented on June 12, 2024 1

Ok so I managed to get it working. (idk why tho)
So I started to look into the PR and the fork, I found this one: https://github.com/cedson61/fpdm
Which seems to work at first glance, but I got weird behavior after, and one of my checkboxes doesn't get recognize anymore. So I rolled back to this repo

So for whatever reason, I edited the PDF with Acrobat DC, I deleted the checkboxes, save the PDF, and I re-added them with the same names and save.

I made sure that I had nothing into the tooltip like said in the repo above:
Just make sure you don't have any alt text on your fields like so (or your checkboxes will come out blank)

I converted the PDF with pdftk like said in the readme of the repo pdftk old.pdf output new.pdf

And now it's working, the only thing that I noticed is that to have the checkbox correctly checked I needed to inverse the boolean
True or "anything" = checkbox unchecked
False or "" = checkbox checked
To solves this (idk how I managed to find that first try)
I changed the export Value in the checkbox properties to something else than "Yes", I put "Oui" (french) and now True = checked
Acrobat_cES8eTDOVC

I can't share this PDF, I will try to share a working one today.
I'm happy to see someone active on this repo, the odds that you had the same problem as me today are quite low 😅

from fpdm.

pacerdev avatar pacerdev commented on June 12, 2024

I can't get them to work either. I have tried all sorts of combinations. Can you please provide a working code example so we can use that as a reference? It may be of note that my array has checkboxes, but also text areas that I need to populate and those are being passed along without issue.

from fpdm.

pacerdev avatar pacerdev commented on June 12, 2024

Same here. Doesn't matter what I use, the fields simply won't populate checkboxes. If the developer can give us the sample pdf and code they used to verify the checkbox function as working, I'm sure I could pull that apart to understand the proper syntax.

Can we get a little bit more info on the checkboxes, please?

from fpdm.

Vincent-HD avatar Vincent-HD commented on June 12, 2024

Well, I also have the same problem, but not exactly sure why, I have a PDF with forms and checkboxes, I can fill them using the library (I got it from someone in my company, but he is not here anymore), but once I edit the PDF through Adobe Acrobat DC or a online PDF editor, the checkbox cannot be filled anymore.

So I'm wondering if the PDF needs to be "encoded" in a specific format (or at least the format on checkbox is changing after editing) and that's why it's not working.

By enabling verbose mode in the library

$pdf->verbose = true;
$pdf->verbose_level = 3;
$pdf->useCheckboxParser = true;

With the old checkbox I got this output:

Change checkbox of the field chpb at line 9387 to value [Oui]
Change checkbox of the field chlu at line 9458 to value [Oui]
Change checkbox of the field chim at line 9426 to value [0]
Change checkbox of the field chgl at line 9490 to value [0]

And with the edited one through Adobe Acrobat DC and converted back with pdftk old.pdf output new.pdf it's not recognizing the checkboxes anymore:

Change checkbox value aborted, the field chpb has no checkbox definition.
Change checkbox value aborted, the field chlu has no checkbox definition.
Change checkbox value aborted, the field chim has no checkbox definition.
Change checkbox value aborted, the field chgl has no checkbox definition.

So I'm guessing there is something wrong with the format of checkboxes

from fpdm.

pacerdev avatar pacerdev commented on June 12, 2024

Running pdftk will break the "checkbox definition" somehow. I have set tooltip and name correctly in Acrobat CC, turned off fast web view an compression, set it all the way down to Acrobat 5.0+ compatible, and on and on...

Right now, I can either format it in Acrobat and get a "field not found" error, or run pdftk on it, and get the dreaded "no checkbox definition" error. :p'''''''

The problem here is that this developer got checkboxes working, but didn't give anyone specs on the PDF. If they developer could simply post a working demo that we can download and pull apart, then the rest is not hard to figure out. But there seems to be some sort of specific setup to the document that must be in place for the "checkbox definition" to be present.

from fpdm.

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.