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

Trying to access array offset on value of type bool with PDF/A #583

Closed
simonbuehler opened this issue Jan 20, 2023 · 1 comment · Fixed by #584
Closed

Trying to access array offset on value of type bool with PDF/A #583

simonbuehler opened this issue Jan 20, 2023 · 1 comment · Fixed by #584

Comments

@simonbuehler
Copy link
Contributor

Hi,

when building a pdf/a i get this exception:

Trying to access array offset on value of type bool

  at vendor/tecnickcom/tcpdf/tcpdf.php:9917
    9913▕                               }
    9914$out .= ' >> >>';
    9915▕                       }
    9916$font = $this->getFontBuffer('helvetica');
  ➜ 9917$out .= ' /DA (/F'.$font['i'].' 0 Tf 0 g)';
    9918$out .= ' /Q '.(($this->rtl)?'2':'0');
    9919//$out .= ' /XFA ';
    9920$out .= ' >>';
    9921// signatures

the problem is IMO in the line

TCPDF/tcpdf.php

Line 9928 in 2fb1c01

$font = $this->getFontBuffer('helvetica');

which should be

 $font = $this->getFontBuffer((($this->pdfa_mode) ? 'pdfa' : '') .'helvetica');

can you reproduce and fix, thanks!

@williamdes
Copy link
Contributor

Can you open a pull-request here?

simonbuehler added a commit to simonbuehler/TCPDF that referenced this issue Jan 20, 2023
nicolaasuni added a commit that referenced this issue Sep 6, 2023
* fix for #583

* fix fix

---------

Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
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

Successfully merging a pull request may close this issue.

2 participants