A component of ASP.NET Core for creating RESTful web services that support HTTP-based communication between clients and servers.
Hi Balaji,
This is a common issue when running Report Viewer in Windows containers. The T2Embed.dll is part of the Windows font subsystem and is typically missing or inaccessible in containerized environments.
Here are a few solutions you can try:
Option 1: Use a different base image
Try using a Windows Server Core base image instead of Nano Server, as it includes more system components:
FROM mcr.microsoft.com/dotnet/framework/aspnet:4.7.2-windowsservercore-ltsc2019
Option 2: Install the missing font components
Add this to your Dockerfile to install the necessary Windows features:
RUN Add-WindowsFeature Server-Media-Foundation RUN DISM /Online /Enable-Feature /FeatureName:ServerMediaFoundation /All
Option 3: Use alternative PDF rendering
Since you're already trying to disable font embedding, you might want to switch to a different PDF rendering approach. Consider using libraries like:
- SelectPdf
- iTextSharp
- PdfSharp
Option 4: Font embedding workaround
Try this more complete device info configuration:
Dim deviceInfo As String = "<DeviceInfo>" & _ "<OutputFormat>PDF</OutputFormat>" & _ "<EmbedFonts>None</EmbedFonts>" & _ "<PrintDpiX>300</PrintDpiX>" & _ "<PrintDpiY>300</PrintDpiY>" & _ "</DeviceInfo>"
Option 5: Copy required DLLsAs a last resort, you can try copying the T2Embed.dll from a full Windows installation to your container, though this isn't recommended and may have licensing implications.
The Windows Server Core approach (Option 1) is usually the most reliable solution for Report Viewer in containers, even though it results in a larger image size.
Let me know if any of these approaches work for you!