dompdf special characters

后端 未结 5 769
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-11 15:21

I\'m having successful html-to-pdf conversions, but not with special characters.

Below is just a special character I\'m trying to display, which displays in browsers

5条回答
  •  醉梦人生
    2020-12-11 16:01

    I have experienced problems with DOMPDF when converting an UTF-8 html page. I simply solved the problem by adding

    
    

    Between < head > tag. Maybe it could be an alternative if you set it with your encoding type.

    IMPORTANT NOTE from comments below: don't use stream() and output() methods on the same pdf instance. If you do this wont work.

提交回复
热议问题