zoukankan      html  css  js  c++  java
  • Ubuntu Linux的DevExpressReport无法显示报表(.net core)

    打开报表会报错:

    System.TypeInitializationException: The type initializer for 'Gdip' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'libgdiplus': The specified module could not be found.
    

    因为报表涉及到生成图片的操作,而.net core在linux下的支持还不太健全,所以需要执行linux命令装几个组件:

    apt-get update
    apt-get install -y apt-utils libc6-dev libgdiplus
    ln -s /usr/lib/libgdiplus.so /usr/lib/gdiplus.dll
    

    然后重启reboot,执行上述命令后即可预览报表了。

    但是打印的话中文还是不会显示,这时候需要安装字体。因为微软雅黑版权问题,我在报表中选择了使用宋体。

    先将宋体文件全部拷贝到/usr/share/fonts目录。字体文件可以自己从C:WindowsFonts拷贝出来

    也可以用我提供的链接下载,我提供了多个字体文件,全部拷贝进去即可。

    链接:https://pan.baidu.com/s/1lM17sFlogCCFTHswqvSGSw 
    提取码:ub60
    

    拷贝完成后执行下列命令

    cd /usr/share/fonts
    chmod 777 *
    mkfontscale
    mkfontdir
    sudo fc-cache -fsv
    

    执行完成后字体便安装成功了。最后进行重启reboot即可。

  • 相关阅读:
    函数的调用惯例
    docker 强制删除镜像
    docker 安装 tomcat8
    阿里云 maven仓库地址配置
    ubuntu 18.04 安装搜狗输入法
    centos 监控进程,并自动重启
    intellj idea show "run dashboard" panel
    Centos7 服务器启动jar包
    maven centos7 环境变量
    linux关于IP,端口,防火墙相关命令
  • 原文地址:https://www.cnblogs.com/cluyun/p/15071300.html
Copyright © 2011-2022 走看看