问题描述
我有一个使用 telerik Reporting 库和 .net core 3.1 设计的报告。我必须使用以下代码为其生成 pdf 文件:
var reportProcessor = new ReportProcessor();
var report = new Report1();
var reportSource = new InstanceReportSource()
{
ReportDocument = report,};
var deviceInfo = new System.Collections.Hashtable{ { "FontEmbedding","Full" } };
var result = reportProcessor.RenderReport("PDF",reportSource,deviceInfo);
在 Windows 上运行时一切正常。但是当在 docker linux 容器 上运行时,生成的 pdf 将根本没有文本 我尝试通过以下命令在容器中安装 fonts 和所需的库
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base
RUN sed -i'.bak' 's/$/ contrib/' /etc/apt/sources.list
RUN apt-get update; apt-get install -y ttf-mscorefonts-installer fontconfig
RUN apt-get update \
&& apt-get install -y --allow-unauthenticated \
libc6-dev \
libgdiplus \
libx11-dev \
&& rm -rf /var/lib/apt/lists/*
但问题仍未解决,请参阅以下代码段
我错过了什么?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)