Git Product home page Git Product logo

Comments (4)

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

For anyone else with this issue, I have now forked this repo and added this rough fix along with a couple of other quick and dirty fixes. Performed some limited testing and so far all good.
https://github.com/TristanHammat-AgilisIT/fpdm/

from fpdm.

belicoffpy avatar belicoffpy commented on June 3, 2024

For anyone else with this issue, I have now forked this repo and added this rough fix along with a couple of other quick and dirty fixes. Performed some limited testing and so far all good.
https://github.com/TristanHammat-AgilisIT/fpdm/

Hi, Always same problem

from fpdm.

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

For anyone else with this issue, I have now forked this repo and added this rough fix along with a couple of other quick and dirty fixes. Performed some limited testing and so far all good.
https://github.com/TristanHammat-AgilisIT/fpdm/

Hi, Always same problem

Even when using my fork?

from fpdm.

PimprenelIe avatar PimprenelIe commented on June 3, 2024

Hello, this is a solution which work for me.
On line 1878, I initialize in the object["infos"] like this :

             elseif (($as=='')&&$this->extract_pdf_definition_value("/AS", $CurLine, $match)) {
                  $as=$match[1];
                  $object["infos"]["checkbox_yes"] = "";
                  $object["infos"]["checkbox_no"] = "";
                  if ($verbose_parsing) {
                      echo("<br>Object's AS is '<i>$as</i>'");
                  }
                  $object["infos"]["checkbox_state"]=$as;
                  $object["infos"]["checkbox_state_line"]=$Counter;
              }

I add this lines :

$object["infos"]["checkbox_yes"] = "";
$object["infos"]["checkbox_no"] = "";

In order to do the change with the best practices, you can extends FPDM class, and redefines copy/paste the function parsePDFEntries() and make the update here.
After that use your new class instead of \FPDM

Example :

class FPDMupdate extends \FPDM
{

    function parsePDFEntries(&$lines){
             [...]
             elseif (($as=='')&&$this->extract_pdf_definition_value("/AS", $CurLine, $match)) {
                  $as=$match[1];
                  $object["infos"]["checkbox_yes"] = "";
                  $object["infos"]["checkbox_no"] = "";
                  if ($verbose_parsing) {
                      echo("<br>Object's AS is '<i>$as</i>'");
                  }
                  $object["infos"]["checkbox_state"]=$as;
                  $object["infos"]["checkbox_state_line"]=$Counter;
              }
             [...]
     }
}


$pdf = new FPDMupdate("template.pdf");

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.