Hi Craig S. Kiessling,
can you paste an URL here where I can see it? thanks.
No worries, I finally figured it out π I had not closed the tags π
Ah – it’s a font thing I guess. My site’s behind a logged-in users only.
Hi Craig,
if it’s a font thing, maybe that will work (worked for arabic),
add this to DK PDF CSS tab:
body {font-family:Arial, sans-serif;}
try it and tell me, thanks.
Unfortunately no.
I’ve found the same issue being mentioned in other pdf-related plugins:
http://docs.wpovernight.com/woocommerce-pdf-invoices-packing-slips/using-custom-fonts/
I am guessing you’re using fpdf? If so, then this might help but I am not sure how to implement it: http://www.ntaso.com/fpdf-and-chinese-characters/
Hi Craig,
DK PDF uses mPDF library:
http://www.mpdf1.com/mpdf/index.php
do you have the font in .ttf format? I mean, if your page prints chinese characters correctly to the browser, then we need to know which font are you using, then I can guide you how to do install this font in mPDF.
Cheers.
UTF-8 encoding shows the regular characters, just like this ζ¦ζ―ζ±ζ³η€Ό.
From some of those links above, I ended up downloading a couple of fonts, and they’re pretty huge. I haven’t done anything yet with them, as although I don’t mind slightly slower load times on this project, I’d rather not get crazy.
I saw this on Stack Exchange (here), but not sure if it works, nor where I’d put that:
You need to enable the support of PDF Asian font like this:
$pdf = $this->pdf->load();
$pdf->useAdobeCJK = true;
$pdf->SetAutoFont(AUTOFONT_ALL);
Btw, I’m also trying to make some links not links in pdfs (just showing unlinked anchor text). To experiment, I tried putting this in the “pdf css” tab, but it didn’t work:
a { pointer-events: none !important; }
it might end up having to be some major javascript or something that’d take more fiddling, no worries. I can do without this π
Any ideas on the characters bit yet?
Hi Craig, sorry for the delay,
I finally figured it out, please add this code in dk-pdf / includes / mpdf60 / dkpdf-functions.php
$mpdf->useAdobeCJK = true;
$mpdf->autoScriptToLang = true;
$mpdf->autoLangToFont = true;
See attachment image for reference:
http://wp.dinamiko.com/demos/dkpdf/wp-content/uploads/2016/04/chinese.png
about make some links not links in pdfs maybe a solution is hiding those links using http://wp.dinamiko.com/demos/dkpdf/doc/dkpdf-remove-shortcode/
Thanks.
No worries and many thanks.
I’m not seeing dk-pdf / includes / mpdf60 / dkpdf-functions.php. But I do see dk-pdf / includes / dkpdf-functions.php.
Should I move it or?
ups! sorry, you’re right:
dk-pdf / includes / dkpdf-functions.php
Thanks.
AH okay cool. Sweet – now the Chinese show up!
Unfortunately the dkpdf-remove won’t work – that removes the text altogether. I am imagining it just applies a display:none style to the element, which I’ve done in the stylesheet for various things.
But I want the anchor (linked text) text to display, but just not as a link.
yes, this is how the shortcode works, removes the entire piece of content inside the shortcode in the PDF.
what is printed in the PDF is exactly the same as you’ve in the HTML, so if you’ve a link, a link will apear in the PDF. I’m not an CSS expert but I think that is not posible to remove a link (the <a href=””… part ) using CSS. If you find how to do it with CSS, you can try to add it to the CSS tab.
Thanks.