-
Notifications
You must be signed in to change notification settings - Fork 66
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
checkbox does not display in acrobat reader #19
Comments
I can confirm this fixes the display error for acrobat. Thx @fabboyrie |
thanks! |
Can you submit a pull request? |
Done It's my first pull request, I hope I made no mistakes. |
This doesn't update /V or /DV if present but rather it just adds new ones following /AS each time /AS is updated. If you run this multiple times on the same PDF you will get a buildup of detritus that would look something like this:
This will cause file bloat for anyone who uses fpdm repeatedly on the same file. A better way might be to record the line numbers for /DV and /V to the "infos" array at the same place as it does for /AS and then only update them if they were already in the PDF file. |
OK, I fixed this in a fork https://github.com/TristanHammat-AgilisIT/fpdm/. Not going to bother with a pull request as it has been about 1.5 years since once has been actioned. There are a couple of other changes and me tripping over my own commits here https://github.com/TristanHammat-AgilisIT/fpdm/commits/master. I will add some additional fixes if I get time. If you test it out and have any issues, let me know. it should now update /AS, /V and /DV but only the ones that are already present in the PDF. |
Thanks! Fix verified on latest Adobe Acrobat Pro DC as well as FireFox. |
That is great to hear. As you may have seen, I ended up fixing a couple of other errors in that fork that could stop checkboxes from displaying at all or displaying the wrong state. Also fixed some deprecated PHP usage and have been using it successfully in a project ever since. |
I'm using Tristan's fork.. Has anyone run into an issue where some checkboxes will check and some won't? Definitely using the correct names and everything. Just specific checkboxes won't check even though I can manually check them. |
@TristanHammat-AgilisIT since this repo does not get updated very much how about putting your fork to its own repo and also sharing it via composer? It is a little bit of a mess otherwise to use your work in real projects. Also can anyone confirm problems that @keithslater had? |
Hi @tertek, that is an interesting point. I will consider doing that when I have a free moment. As for the problems @keithslater is experiencing, I am not sure what could be causing them as it could be a host of things. fpdm is not exactly bug-free, robust, up-to-date or full-featured. I believe there are also different types of PDF forms and this code only supports the simple old original ones. Here is my process for creating a form to fill out using fpdm:
This is the process that we used to make all of the PDF forms for our production project. We have about 20 different PDFs with form fields and we fill them out with different data ~400 times per quarter during an automated bulk mailout. The only issue we have hit with this process is that IOS and Android PDF viewers don't seem to recognise ticked checkboxes on the PDFs, however, all tested desktop viewers render the checkboxes correctly so I haven't bothered to work out why the mobile device PDF viewers can't do the same. |
I ended up switching to php-pdftk which worked out great |
When I use fpdm, checkbox appears correctly in okular but not in latest acrobat reader.
With the following change in src/fpdm.php, it works but I do not know what I am really doing...
The text was updated successfully, but these errors were encountered: