Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 130709

Special characters disappear when converting to PDF

$
0
0

Replies: 0

I’m trying to update a site (rittlit.com) that lets users convert the info on a page to PDF. I think so they can attach it to an email. I don’t know, I didn’t design the site.
However, when the page is converted to PDF, all the special characters – apostrophes, dashes, etc – disappear and are replaced with different, weirder characters.
There’s an HTML parser running on the generatePDF.php template. Here’s the relevant code:

function WriteHTML($html){
		//HTML parser

I’m guessing there should be a line in there designating UTF8 as the charset, but I’m having trouble figuring out how exactly to express that. I’ve tried adding a line that says
<meta charset="UTF-8">
but that gives me an error message – unexpected t-string in .php. Any ideas about how to tame my whacky characters?


Viewing all articles
Browse latest Browse all 130709

Trending Articles