mpdf deleted not needed Folders - mpdf

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

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

Related

Zabbix not display text on graphs

I'm running zabbix 4 on EC2 Amazon Linux 2 instance. After last update:
May 29 08:06:46 Updated: zabbix-web-mysql-4.0.8-1.el7.noarch
May 29 08:06:46 Updated: zabbix-web-4.0.8-1.el7.noarch
May 29 08:06:46 Updated: zabbix-get-4.0.8-1.el7.x86_64
May 29 08:06:47 Updated: zabbix-server-mysql-4.0.8-1.el7.x86_64
May 29 08:06:47 Updated: zabbix-agent-4.0.8-1.el7.x86_64
All my dashboards graphs lost text description. Even in host configuration, when I click preview in graph there is no text.
Checked on Chrome and Firefox. Tried to recreate dashboard, cleaned browser cache. I googled that it can be issue with fonts. Checked... Still not solved.
screen_of_my_dashboard
screen_of_graph_preview
Resolved on my 4.2.2.
verify permissions for '/usr/share/zabbix/assets', if not 'www-data:www:data'
chown www-data:www-data assets/
If the file does not exist (/usr/share/zabbix/fonts/graphfont.ttf):
cd assets/fonts/
Copy the file graphfont.ttf to /usr/share/zabbix/assets/fonts/: (source: https://support.zabbix.com/browse/ZBX-16182)
cp /usr/share/zabbix/fonts/graphfont.ttf /usr/share/zabbix/assets/fonts/
Or link the file:
ln -s /usr/share/zabbix/fonts/graphfont.ttf /usr/share/zabbix/assets/fonts/
by, Bruno Dolastro - Br4zil

R shiny-server is not finding my logo png file despite giving it read permissions

I want my logo (a png file) to be shown at the top left of the shiny dashboard.
So I have kept the png file here:
$$:/srv/shiny-server/www$ ll
total 24
drwxr-xr-x 2 root root 4096 Jul 7 00:49 ./
drwxrwxrwx 3 root root 4096 Jul 7 00:48 ../
-rw-rw-r-- 1 root root 14390 Jul 6 23:38 logo.png
because my /etc/shiny-server/shiny-server.conf file has:
# Host the directory of Shiny Apps stored in this directory
site_dir /srv/shiny-server;
In my MyApp/ui.R code, I have:
shinyUI(
dashboardPage(
dashboardHeader(
title = tags$a(href='http://www.tech.com', tags$img(src="logo.png")),
...
)
The app's name is MyApp and it has server.R and ui.R.
When I run this, I get an icon of a question mark which I assume means that it could not find the file. What I cant get is where exactly is shiny server looking for this file? Where am I supposed to put it so that it can read the file?
I have put read permissions to the logo.png file and have tried putting it in all sorts of places (within /src/shiny-server and also within MyApp, inside or not inside of a www folder but all to no avail). I am obviously missing the actual correct location set by convention. The problem is that RStudio does not give any error message at the console that could have read something like "Could not find file ... when looking at location ....".
I tried the documentation but couldnt get clearly with a clear example of where exactly to put this png file to make it work.
I am using shiny-server version 1.4.2
> system('shiny-server --version', intern = TRUE)
[1] "Shiny Server v1.4.2.786" "Node.js v0.10.40"
> packageVersion("shiny")
[1] ‘0.13.2’
I will appreciate any help in the matter. Thanks very much in advance.
Okay, I discovered the error. It was probably too late at night and I had a brain freeze. For this to work, the image should be in a folder www as in www/logo.png and this www directory should be placed in the same directory containing the files server.R and ui.R. Also, the permissions of the www folder should be drwxdrwxr_x and permissions of the logo.png file inside it, rwxrwxr__
It is actually as simple as that.

Dist build of Google web app starter kit has different font than original

I am able to compile my web page using Google's Web App Starter Kit. However, upon running gulp serve:dist, my page is brought up with a different looking font than the default Roboto Condensed I expect. Instead, the font changes to what seemingly looks like default Roboto.
Terminal log does not indicate any errors and my dist folder indicates that I all my fonts are of Roboto Condensed. I've also tried testing on both chrome and safari but both show a different font:
~> gulp serve:dist
[21:26:17] Using gulpfile ~/dev/xxxx/gulpfile.js
[21:26:17] Starting 'clean'...
[21:26:17] Finished 'clean' after 33 ms
[21:26:17] Starting 'default'...
[21:26:17] Starting 'styles'...
[21:26:20] styles all files 92.91 kB
[21:26:20] Finished 'styles' after 2.6 s
[21:26:20] Starting 'jshint'...
[21:26:20] Starting 'html'...
[21:26:21] Starting 'images'...
[21:26:22] Starting 'fonts'...
[21:26:22] Starting 'copy'...
[21:26:22] Finished 'jshint' after 2.51 s
[21:26:23] html all files 51.2 kB
[21:26:23] Finished 'html' after 3.22 s
[21:26:24] copy all files 53.49 kB
[21:26:24] Finished 'copy' after 2.41 s
[21:26:25] fonts all files 1.09 MB
[21:26:25] Finished 'fonts' after 2.82 s
[21:26:25] images all files 27.96 MB
[21:26:25] Finished 'images' after 3.75 s
[21:26:25] Finished 'default' after 7.76 s
[21:26:25] Starting 'serve:dist'...
[21:26:25] Finished 'serve:dist' after 59 ms
[WSK] Local URL: http://localhost:3000
[WSK] External URL: http://xx.xx.xxx.xxx:3000
[WSK] Serving files from: dist
Anyone know how I can preserve the original Roboto Condensed font in the dist build? Thanks

Symfony 1.4 - .gitignore doesn't working in some ceses

I am using Symfony 1.4 in my project. I have .gitignore file that working in this configuration.
config/databases.yml
apps/erp/config/factories.yml
.buildpath
.project
.settings
.idea
.DS_Store
.rsync_cache
catalog.xml
config/databases.yml
log/*
cache/*
web/uploads
web/pdf_files
web/knp_sn*
data/sql/*.sql
But I don't know how to ignore every dir that name are map and om in lib/model/ directory.
I have inside lib/model around 50 folders, and each contains map and om dir that schould be ignored
This configuration /lib/model/*/om /lib/model/*/map doesn't working
Ok I found a solution. I had to add slash at the end of line
/lib/model/*/om/
/lib/model/*/map/

Accurev: how to ignore contents of a directory but not the directory

I have a "project" directory which has an .acignore file containing:
out/*
The "project" directory contains the checked-in "out" directory. But i want to ignore anything in the "out" directory tree.
The above doesn't seem to work. What's the right syntax?
Thanks.
That syntax is actually correct. My guess is that the contents of the "out" directory have status of (member). ACCUREV_IGNORE_ELEMS and .acignore won't ignore files that are already under AccuRev control. Note that in this example, the files in my "Out" directory are not already member, so don't show up in the (external) search request:
C:\demo\ws\Twins_SP1_mauer\WebApp>dir
04/10/2010 04:49 PM 7 .acignore
04/10/2010 04:44 PM Out
C:\demo\ws\Twins_SP1_mauer\WebApp>cat .acignore
Out/*
C:\demo\ws\Twins_SP1_mauer\WebApp>dir Out
04/10/2010 04:43 PM 0 file1.txt
04/10/2010 04:44 PM 0 file2.txt
C:\demo\ws\Twins_SP1_mauer\WebApp>accurev stat -x
.\WebApp.acignore (external)
Accurev's filtering is used only to filter what appears in the (external) list so if things have already been added, they will not be filtered out.
The .acignore files are not able to specify a recursive pattern - is the "out" directory at the same level as the .acignore? You need to put them in each directory of the tree.
I added .acignore files to our entire tree to save people having to specify ACCUREV_IGNORE_ELEMS on their machines. A typical .acignore is:
*.ncb
*.suo
*.user
Debug/*
Debug
bin/*
bin
obj/*
obj
Release/*
Release
TestResults
TestResults./*

Resources