Frans
Frans

Reputation: 41

Background Position Array when generate pdf using dompdf

I try to generate pdf file using library dompdf in php but found the following error.

A PHP Error was encountered

Severity: Warning
Message: explode() expects parameter 2 to be string, array given
Filename: include/style.cls.php
Line Number: 1061

I tried to debug and found this array that cause error

array
  'background_position' => 
    array
      0 => string '0%' (length=2)
      'x' => string '0%' (length=2)
      1 => string '0%' (length=2)
      'y' => string '0%' (length=2)
  'background' => string 'none' (length=4)

My question is how can i fixed this error, where this array come from?

Appreciate for any response.

thanks, Frans

Upvotes: 0

Views: 456

Answers (1)

mkjasinski
mkjasinski

Reputation: 3098

you must set background_position as string with space separator. Look for class code here line 989 - begin of method

Upvotes: 0

Related Questions