RDLC reports on Linux and in Docker
ReportViewer renders RDLC on Windows, under .NET Framework. The community port to modern .NET runs elsewhere, but its
own README lists what breaks off Windows: fonts are measured with a Windows-only component, and images fail on other
platforms from .NET 7, because System.Drawing is Windows-only (see
the sources). On Linux that means copying Windows fonts into the image,
working around the images, and living with the differences.
Tagua has none of those dependencies: it is managed .NET code, with no System.Drawing and no libgdiplus, and it
does not look for fonts installed on the machine. A report renders the same on Windows, Linux and macOS, because
everything it needs travels with the template.
Convert the reports
Section titled “Convert the reports”dotnet tool install --global Tagua.Clitagua import ReportsEach .rdlc becomes a .report.yaml template, embedded images are written next to it, and tagua-import-summary.md
lists what, if anything, needs a look. Render them from your application as the
ASP.NET Core guide shows.
Fonts travel with the templates
Section titled “Fonts travel with the templates”PDF has three font families built in, and Tagua draws Arial, Times New Roman and Courier New with them: reports that
use only those need no font files at all. For any other font, tagua import lists it, and you declare its files in
the template, next to it in your project:
fonts: Calibri: regular: fonts/Carlito-Regular.ttf bold: fonts/Carlito-Bold.ttfCarlito, Caladea and Selawik are free fonts with the metrics of Calibri, Cambria and Segoe UI, so text wraps as in the original. Other fonts, Verdana or Tahoma for instance, need their own files, if their licence allows embedding. Nothing is installed in the image: the font files are part of your application, like the templates.
A Docker image
Section titled “A Docker image”Publish the application with its templates and fonts, and copy the output into the ASP.NET runtime image:
<ItemGroup> <Content Include="Reports/**" CopyToOutputDirectory="PreserveNewest" /></ItemGroup>FROM mcr.microsoft.com/dotnet/sdk:10.0 AS buildWORKDIR /srcCOPY . .RUN dotnet publish -c Release -o /app
FROM mcr.microsoft.com/dotnet/aspnet:10.0WORKDIR /appCOPY --from=build /app .ENTRYPOINT ["dotnet", "InvoiceService.dll"]No apt-get install step: no libgdiplus, no font packages.
Native AOT
Section titled “Native AOT”Tagua compiles with native AOT, so the service can be a single native executable in the smallest runtime image:
<PropertyGroup> <PublishAot>true</PublishAot></PropertyGroup>The native compiler needs clang and zlib in the build stage, and nothing in the runtime one:
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS buildRUN apt-get update \ && apt-get install -y --no-install-recommends clang zlib1g-devWORKDIR /srcCOPY . .RUN dotnet publish -c Release -o /app
FROM mcr.microsoft.com/dotnet/runtime-deps:10.0WORKDIR /appCOPY --from=build /app .ENTRYPOINT ["./InvoiceService"]The migration guide covers what converts and what needs a person, and two worked examples show reports converted and rendered.