Search code examples
phppdfencodingubuntupdftk

Weird characters when filling PDF with PDFTk


I'm using php with PDFTK on Ubuntu. When filling a PDF with data, I get weird characters for this letters with accents: á ó í. I'm using UTF-8 encoding: I checked with echo mb_check_encoding($var, 'UTF-8') which outputs 1 - TRUE. Any idea what I can do?

I also tried converting to ISO with utf8_decode, but still, no luck.

Thanks


Solution

  • Solved with utf8_decode. I guess there were some caching problems and the characters were still showing