Tips and Tricks HQ Support Portal › Forums › WP PDF Stamper › PDF Stamper – UTF-8 characters appearing as boxes on stamped files.
Tagged: Chinese, pdf stamper, utf8, utf8 characters
- This topic has 5 replies, 3 voices, and was last updated 10 years, 1 month ago by admin.
-
AuthorPosts
-
October 23, 2014 at 2:20 pm #11671morleyMember
For some reason, UTF-8 characters showed up as boxes when stamped on a recent pdf. I checked the collation, and it’s set to utf8 for all the database tables. I have UTF-8 checked in the PDF Stamper settings. The characters were entered correctly into the customer table, so it’s strange that the stamping didn’t work as expected. The eStore version is 7.1.6 and the PDF Stamper version is 4.4.5. Any ideas? Thanks.
October 23, 2014 at 5:45 pm #66316wzpModeratorCan you post a link to a sample of the stamped file?
October 23, 2014 at 6:43 pm #66317morleyMemberUnfortunately, no. However, I checked the document in Acrobat, and the stamped text is in DejaVuSansCondensed-Oblique; it’s embedded as a subset which seems as it should be. I copied the stamped text (square-looking characters), and when I pasted it elsewhere, the characters displayed properly.
I downloaded the font and took a look at the glyph mapping. It doesn’t include Chinese characters, which is mostly why I needed the UTF8 support. Is there another (more complete) UTF8 font that could be used with PDF Stamper?
October 23, 2014 at 10:13 pm #66318adminKeymasterWhich language is this for? Are you trying to stamp in Chinese language?
Is your PayPal account setup to send notification in utf-8 format?
October 23, 2014 at 10:44 pm #66319morleyMemberYes, the language is Chinese. I previously configured my PayPal account to send IPNs in utf-8 per the above linked thread. The name and address for this transaction were received and entered correctly into the customers table. I believe the issue is just that the font itself doesn’t contain Chinese characters.
October 23, 2014 at 11:27 pm #66320adminKeymasterI don’t fully understand what the deal is with Chinese and Japanese characters and PDF files but for some reason the standard UTF-8 doesn’t cover those languages for PDF file. We have added the following two fonts to handle Chinese characters:
– mingliu
– Big5
To use them please do the following:
1. Keep the “Use UTF-8 Font” checkbox checked in the settings.
2. Open the “wp_pdf_stamp.php” file and search for the following line of code:
define('WP_PDF_STAMP_USE_UTF_FONT', "1");
Once you find it change that line to the following to make PDF stmaper use mingliu font:
define('WP_PDF_STAMP_USE_UTF_FONT', "2");
Alternatively, change that line to the following to use the Big-5 font:
define('WP_PDF_STAMP_USE_UTF_FONT', "3");
-
AuthorPosts
- You must be logged in to reply to this topic.