/    Sign up×
Community /Pin to ProfileBookmark

display special characters on PDF using PHP

Hi All,

? I am just a new programmer. I would like to ask you whether someone has an idea to solve my problem. Right now, I am using PHP version 4 and I got a problem when I want to display the special characters. For example I have $delivery_address[‘town’] which has a value “Münich” (retreive from the database) but when I display on the pdf, I got the result “Münich”.
Code:
$this->set_fontsize(12);
pdf_show_xy($this->pdf, $delivery_address[‘zip’] . ‘ ‘ . $delivery_address[‘town’], $x + 8, $y);

function set_fontsize($size) {
$font = pdf_findfont($this->pdf, ‘Helvetica’, ‘winansi’, 0);
pdf_setfont($this->pdf, $font, $size);
}

When I replaced $delivery_address[‘town’] on the code with “Münich”, it’s going to show “Münich”. It’s very strange for me. Does anyone could help me to solve this problem?

Thank you,

Cnyo ^__^

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@ZiplineMar 31.2006 — Sounds like it may be an issue with the character set being used to generate the PDF. Do you know what is currently being used and do you know if you can adjust it?
×

Success!

Help @cnyo spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.6,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...