Warning: include(/home/blog66rr/public_html/wp-content/plugins/hyper-cache/cache.php): failed to open stream: No such file or directory in /home/blog66rr/public_html/wp-content/advanced-cache.php on line 24

Warning: include(/home/blog66rr/public_html/wp-content/plugins/hyper-cache/cache.php): failed to open stream: No such file or directory in /home/blog66rr/public_html/wp-content/advanced-cache.php on line 24

Warning: include(): Failed opening '/home/blog66rr/public_html/wp-content/plugins/hyper-cache/cache.php' for inclusion (include_path='.:/opt/cpanel/ea-php70/root/usr/share/pear') in /home/blog66rr/public_html/wp-content/advanced-cache.php on line 24

Warning: Cannot modify header information - headers already sent by (output started at /home/blog66rr/public_html/wp-content/advanced-cache.php:24) in /home/blog66rr/public_html/wp-includes/feed-rss2.php on line 8
修復 – unethost無限空間虛擬主機 技術分享部落格 https://blog.unethost.com unethost 專注於提供優質的虛擬主機服務及相關問題解答 Tue, 14 Jun 2016 14:57:19 +0000 zh-TW hourly 1 https://wordpress.org/?v=6.0.8 如何修復 whmcs 的帳單,匯出 pdf 是中文亂碼的問題? https://blog.unethost.com/how_to_fix_whmcs_invoice_pdf_font_garble_to_traditional_chinese/ Tue, 14 Jun 2016 14:57:19 +0000 http://blog.unethost.com/?p=3548 閱讀全文 如何修復 whmcs 的帳單,匯出 pdf 是中文亂碼的問題?]]> whmcs_pdf_garble_wp

因客戶反應我們的帳務系統,產生的pdf檔帳單是亂碼,
我們回憶起這個問題,在whmcs 5.x版時曾經修過一次,
沒想到whmcs 6 又壞了。

詢問官方線上服務,終於知道為什麼了。

這個問題,源自於兩個部份:

<字型檔的問題>

1. 官方預設的字型,無法相容於中文,導致輸出都是亂碼。

whmcs_pdf_garble_01

 

2.可以使用我們網上找到的這個字型:
字型下載:Droid_Sans_Fallback

 

<程式路逕問題>

3. whmcs 5 的路逕

根據一般文件提示:https://github.com/asika32764/whmcs-zhtw-language-pack

字型檔要上傳到 /includes/classes/TCPDF/fonts

 

4. whmcs 6 的路逕

從官方的文件得知: http://docs.whmcs.com/PDF_Invoice#Additional_Fonts

下列兩個路逕都要上傳:

vendor/tecnickcom/tcpdf/fonts

vendor/tecnick.com/tcpdf/fonts

 

5.最後就是後台的字型調整

whmcs_pdf_garble_02

 

6.正常了

whmcs_pdf_garble_03

 

<結論>

雖然軟體越肥,越容易因為維護團隊的不同,而導致異常,
但只要官方客服團隊,能夠順利處理,其實就不會有太多問題。

 

(本篇教學由unethost.com客服撰寫)

延伸閱讀:如何備份Cpanel後台安裝的套裝程式?

安裝上述的軟體,我們提供虛擬主機試用,七天滿意保證,
功能完整使用不受限制,歡迎點我申請。

]]>