21
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
zpc 2026-03-31 17:12:50 +08:00
parent b8c66a363d
commit 401de20ee1
2 changed files with 3 additions and 1 deletions

View File

@ -14,5 +14,7 @@ RUN dotnet publish "src/MiAssessment.Api/MiAssessment.Api.csproj" -c Release -o
FROM base AS final
WORKDIR /app
# 安装字体(页码渲染需要)
RUN apt-get update && apt-get install -y --no-install-recommends fonts-dejavu-core && rm -rf /var/lib/apt/lists/*
COPY --from=build /app/publish .
ENTRYPOINT ["dotnet", "MiAssessment.Api.dll"]

View File

@ -410,7 +410,7 @@ public class PdfGenerationService : IPdfGenerationService
{
using var document = new PdfDocument();
var totalPages = images.Count;
var font = new XFont("Arial", 10, XFontStyle.Regular);
var font = new XFont("DejaVu Sans", 10, XFontStyle.Regular);
var brush = new XSolidBrush(XColor.FromArgb(153, 153, 153)); // #999999
for (var i = 0; i < totalPages; i++)