mono / SkiaSharp

SkiaSharp is a cross-platform 2D graphics API for .NET platforms based on Google's Skia Graphics Library. It provides a comprehensive 2D API that can be used across mobile, server and desktop models to render images.
MIT License
4.14k stars 522 forks source link

[BUG] Font is not rendering properly when converting DOC to PDF in Blazor WASM NET8.0 #2793

Closed ignasstephanie closed 1 month ago

ignasstephanie commented 2 months ago

Description

When converting DOC to PDF using Syncfusion DocIORenderer as shown in the code below, the output font family does not properly show as how it should be. I am using SkiaSharp.Views.Blazor 2.88.7 NuGet package.

Code

public MemoryStream BuildPDF()
{
    DocIORenderer render = new DocIORenderer();
    render.Settings.EmbedCompleteFonts = true;
    PdfDocument pdfDocument = render.ConvertToPDF(document);
    MemoryStream outputStream = new MemoryStream();
    pdfDocument.Save(outputStream);
    pdfDocument.Close();
    outputStream.Position = 0;
    return outputStream;
}

Expected Behavior

No response

Actual Behavior

No response

Version of SkiaSharp

Other (Please indicate in the description)

Last Known Good Version of SkiaSharp

2.88.2 (Previous)

IDE / Editor

Visual Studio Code (Windows)

Platform / Operating System

Windows

Platform / Operating System Version

No response

Devices

No response

Relevant Screenshots

The Word document is like the image below: image

On the other hand, the output PDF from conversion: image

Relevant Log Output

No response

Code of Conduct

mattleibow commented 1 month ago

I don't know what DocIORenderer is. Is that a separate library? Maybe open an issue for that team to investigate.

ignasstephanie commented 1 month ago

This issue has been fixed on the Syncfusion's side. Thank you!