fpdm icon indicating copy to clipboard operation
fpdm copied to clipboard

checkox no working

Open zigomario opened this issue 5 years ago • 3 comments

Hello,

after multiple test, i think that we have some trouble with checkbox.

1 . Checbox must be have "exported value" ( don't now wording exact ) set. ( see that with : https://www.pdfescape.com )

  1. After multi dump/verbose etc etc , i see that

` if ($verbose_set) { echo "
Change checkbox of the field $name at line $field_checkbox_line to value [$value]"; } $state = $this->value_entries["$name"]["infos"]["checkbox_no"];

                    if ($value) {  
                        var_dump('change state plop : ' . $state);
                    }
                    $CurLine =$this->pdf_entries[$field_checkbox_line];
                    $OldLen=strlen($CurLine);
                    $CurLine = '/AS /'. $state;
                    $NewLen=strlen($CurLine);
                    $Shift=$NewLen-$OldLen;
                    $this->shift=$this->shift+$Shift;
                    //Saves
                    $this->pdf_entries[$field_checkbox_line]=$CurLine;

                    return $Shift;

`

when we dump var_dump($this->value_entries["$name"]["infos"]) and $this->pdf_entries ( script in and out ) we can see that value of checkox is not changed . Script change state ( $CurLine = '/AS /'. $state; ) but not the value .

So..my pdf checbox is never change.

now if u add : $this->pdf_entries[$field_checkbox_line - 1]= '/V /' . $state; ( i change value ) It's working !!

But... maybe it's not good and cause trouble.. i don't know. I

zigomario avatar Oct 26 '20 10:10 zigomario

I have the same problem. But I tried yout patch and behaviour hasn't changed :-(.

Arandy avatar Nov 14 '20 10:11 Arandy

I have the same problem. But I tried yout patch and behaviour hasn't changed :-(.

i have surrender this repo ... i use : https://github.com/mikehaertl/php-pdftk _ all work

zigomario avatar Nov 18 '20 21:11 zigomario

This looks like a duplicate of #19

imclean557 avatar Nov 19 '20 02:11 imclean557