Git Product home page Git Product logo

Comments (12)

TristanHammat-AgilisIT avatar TristanHammat-AgilisIT commented on June 12, 2024 2

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.

from fpdm.

fabboyrie avatar fabboyrie commented on June 12, 2024 1

Done
#42

It's my first pull request, I hope I made no mistakes.

from fpdm.

JUVOJustin avatar JUVOJustin commented on June 12, 2024

I can confirm this fixes the display error for acrobat. Thx @fabboyrie

from fpdm.

jjjrmy avatar jjjrmy commented on June 12, 2024

thanks!

from fpdm.

imclean557 avatar imclean557 commented on June 12, 2024

Can you submit a pull request?

from fpdm.

TristanHammat-AgilisIT avatar TristanHammat-AgilisIT commented on June 12, 2024

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:

/V /Off
/AS /Off
/DV /Off
/V /Off
/DV /Yes
/V /Yes
/DV /Off
/V /Off

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.

from fpdm.

libertychisasuro avatar libertychisasuro commented on June 12, 2024

Thanks! Fix verified on latest Adobe Acrobat Pro DC as well as FireFox.

from fpdm.

TristanHammat-AgilisIT avatar TristanHammat-AgilisIT commented on June 12, 2024

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.

from fpdm.

keithslater avatar keithslater commented on June 12, 2024

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.

from fpdm.

tertek avatar tertek commented on June 12, 2024

@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?

from fpdm.

TristanHammat-AgilisIT avatar TristanHammat-AgilisIT commented on June 12, 2024

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:

  1. Use the free online pdfescape.com to add all the form fields to the PDF and give them unique names. We also lock all of the form fields so that users don't accidentally change the content. fpdm just ignores the locked status of fields and fills them out regardless when filling the form.
  2. Sometimes PDF files will have features not supported by fpdm so next, we convert the pdf files to a guaranteed editable format using free version of the pdftk (pdflabs.com) command-line tools for windows. No special arguments are required as we simply read in the PDF and write it out to a new file. Any features unsupported by fpdm should be lost from the PDF in this process.
    pdftk form.pdf output form-fixed.pdf

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.

from fpdm.

keithslater avatar keithslater commented on June 12, 2024

I ended up switching to php-pdftk which worked out great

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.