Anatol
Anatol

Reputation: 2043

mpdf deleted not needed Folders

for a Project I´ve installed mpdf 6 via composer

composer require mpdf/mpdf

It works great but the lib itself is ten times as big as my whole project. Are there any Files I can get rid of? For example when do I need iccprofiles Folder? Or ttfonts (as I use a custom font in HTML)?

Thanks!

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

Upvotes: 4

Views: 1675

Answers (1)

Anatol
Anatol

Reputation: 2043

What worked for me is:

  • create a minified version of mpdf: http://mpdf1.com/manual/index.php?tid=406
  • Edit config_fonts.php remove unneeded from $this->fontdata
  • Remove unneded fonts from ttfonts
  • delete iccprofiles as I do not use this

    … 14M total

Upvotes: 3

Related Questions