補充:
不內嵌字型的方法:
1.在makefont 時加入參數
MakeFont (string $fontfile, string $fmfile [, boolean $embedded [, $enc="cp1252" [, $patch=array()]]])
$fontfile : .ttf or .pfb 的檔案路徑.
$fmfile : Path to the .afm file for Type1 and TrueType or .ufm for TrueTypeUnicode. $embedded : Set to false to not embed the font, true otherwise (default).
$enc : Name of the encoding table to use. Default value: cp1252.
2.修改產生的.php檔案
更改字體類型為 $type='cidfont0';
增加一行設置默認字體寬度 $dw=1000;
移除 $enc, $file and $ctg 的變數定義
依據你的語系新增下列的文字區塊到文件的最後
// Chinese Traditional / /繁體字型
$enc='UniCNS-UTF16-H';
$cidinfo=array('Registry'=>'Adobe', 'Ordering'=>'CNS1','Supplement'=>0);
include(dirname(__FILE__).'/uni2cid_ac15.php');
回應
Re:
適用於 4.7 版的 print 的中文翻譯檔
Re: Print Friendly Pages
請問這個模組可以列印出 CCK 的東西嗎?
為什麼我都印不出來
謝謝大家
Re: Print Friendly Pages
看起來是因為這模組只把 node body 印出來,其他 CCK 欄位就沒印到了:
<div class="content"><?php print $node->body; ?>
</div>
怎改呢...不太瞭解...
另一個 printable 模組則可以全部印出,不過其預設的列印版型不大好看...
Re: Print Friendly Pages
新版本現在稱為 Printer, e-mail and PDF versions
提供友善列印 e-mail傳送及直接將node轉成pdf
轉pdf部分 可用 dompdf和 TCPDF兩個工具
不過好像都不支援中文
Re: Print Friendly Pages
應該還是有可能喔!
http://www.google.com.tw/search?num=50&hl=zh-TW&c2coff=1&client=firefox-...
--
from open mind to open source~
Re:
將PDF檔案內容以中文字輸出方式
1. 下載 tcpdf_php5 http://sourceforge.net/project/showfiles.php?group_id=128076
2. 將檔案解開,裡頭的 utils目錄有 ttf2ufm.exe 檔必須在WINDOWS下動作
3. 下載免費的中文字型檔 .TTF形式的
4. 把字型放到utils當中,執行 ttf2ufm.exe -a -F 你所下載的字型檔檔名.ttf
5. 跑完之後將所有產生的檔案上傳到/sites/all/modules/print/tcpdf/fonts/utils目錄中(產生的檔案應該有 .afm .t1a .ufm 這三個)包含你所下載的字型檔.ttf
6. 在utils目錄下執行php -q makefont.php 你所下載的字型檔檔名.ttf 你所下載的字型檔檔名.ufm
執行完應該會產生 .php .z ctg.z 這三個檔案
7.將這3個檔案移到上一層也就是fonts目錄中
8.到管理區設定PDF資料,Font Family欄位請輸入你所轉換的字型檔檔名,然後看成果
以上的資料我參考這裡 http://www.mamu.com.tw/blog/2008/06/05/vtigercrm-part-two-chinese/ 這篇的TCPDF版本稍有差異,不曉得是哪個版本的?
目錄裡並無 makefontuni.php 檔,死馬當活馬醫把東西弄出來了,請各位參考囉,如果所使用的字型並非大眾化時才將字型內嵌,字數太多的文章不建議內嵌字形,輸出檔案會相當肥,太多人同時索取會讓伺服器超載
補充:
不內嵌字型的方法:
1.在makefont 時加入參數
MakeFont (string $fontfile, string $fmfile [, boolean $embedded [, $enc="cp1252" [, $patch=array()]]])
$fontfile : .ttf or .pfb 的檔案路徑.
$fmfile : Path to the .afm file for Type1 and TrueType or .ufm for TrueTypeUnicode.
$embedded : Set to false to not embed the font, true otherwise (default).
$enc : Name of the encoding table to use. Default value: cp1252.
2.修改產生的.php檔案
更改字體類型為 $type='cidfont0';
增加一行設置默認字體寬度 $dw=1000;
移除 $enc, $file and $ctg 的變數定義
依據你的語系新增下列的文字區塊到文件的最後
// Chinese Traditional / /繁體字型
$enc='UniCNS-UTF16-H';
$cidinfo=array('Registry'=>'Adobe', 'Ordering'=>'CNS1','Supplement'=>0);
include(dirname(__FILE__).'/uni2cid_ac15.php');
// 簡體字型
$enc='UniGB-UTF16-H';
$cidinfo=array('Registry'=>'Adobe', 'Ordering'=>'GB1','Supplement'=>2);
include(dirname(__FILE__).'/uni2cid_ag15.php');
還不懂怎麼改請參考arialunicid0.php檔案裡的配置,或是參考官網說明
http://www.tecnick.com/public/code/cp_dpage.php?aiocp_dp=tcpdf_fonts
展示請看這裡 http://www.dionysian.idv.tw/node/13
Re: Print Friendly Pages
感謝!
Re: Print Friendly Pages
詢問大家~
>w<若使用安了此模組但是使用pdf時,中文字都會跑亂碼要如何解決呢? 謝謝
Re: Print Friendly Pages
請問有人有安裝6.x的版本嗎?
TCPDF ERROR: Missing or incorrect image file: D:\....\sites\all\modules\print\print_pdf\tcpdf\cache\jpg276.tmp
使用時有出現這樣的錯誤訊息,請問該如何解決才能轉換PDF呢?
Re: Print Friendly Pages
我也是6版的但沒遇到上面的問題~
只遇到pdf轉出來是亂碼的問題>w<
Re: Print Friendly Pages
6.x 用的正體中文翻譯檔。