2016-01-05 80 views
1

的項目從來就通過作曲家MPDF刪除不需要的文件夾

composer require mpdf/mpdf 

它的偉大工程,但LIB本身是十倍那麼大我的整個項目安裝MPDF 6。有沒有我可以擺脫的文件?例如,我什麼時候需要iccprofiles文件夾?或ttfonts(因爲我在HTML中使用自定義字體)?

謝謝!

Base-Mac:mpdf base$ du -shc .??* * 
12K .DS_Store 
4,0K .gitattributes 
144K CHANGELOG.txt 
8,0K CREDITS.txt 
20K LICENSE.txt 
8,0K README.txt 
1,2M classes 
656K collations 
4,0K composer.json 
8,0K compress.php 
28K config.php 
8,0K config_fonts-distr-without-OTL.php 
12K config_fonts.php 
16K config_lang2fonts.php 
8,0K config_script2lang.php 
88K font 
28K graph.php 
4,0K graph_cache 
40M iccprofiles 
1,5M includes 
12K lang2fonts.css 
4,0K mpdf.css 
1,2M mpdf.php 
52K mpdfi 
504K patterns 
4,0K progbar.css 
6,9M qrcode 
4,0K tmp 
536K ttfontdata 
87M ttfonts 
140M total 

回答

2

什麼工作對我來說是:

  • 創建MPDF的縮小版本: http://mpdf1.com/manual/index.php?tid=406
  • 編輯config_fonts.php從$這個 - > fontdata
  • 刪除不需要取下unneded字體ttfonts
  • 刪除iccprofiles,因爲我不使用這個

    ... 14M總

+0

如果你不打算生成QR碼,你可以安全地刪除QR碼/數據目錄和拯救他人6+ MB – Finwe

+0

鏈接已經死了。我希望你已經把鏈接的內容 –

+0

@StefanoMtangoo我認爲用於創建精簡版mpdf的新鏈接在這裏:https://mpdf.github.io/installation-setup/reducing-memory-usage.html – Mohsin

相關問題