Skip to content
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

checkox no working #38

Open
zigomario opened this issue Oct 26, 2020 · 3 comments
Open

checkox no working #38

zigomario opened this issue Oct 26, 2020 · 3 comments

Comments

@zigomario
Copy link

zigomario commented Oct 26, 2020

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

@Arandy
Copy link

Arandy commented Nov 14, 2020

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

@zigomario
Copy link
Author

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

@imclean557
Copy link

This looks like a duplicate of #19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants