Description
When I save a PDF file and set DefaultFontName
to a valid and existing font name, the saved PDF prompts a font error when opened with Adobe.
Env
- Windows 11
- Aspose.PDF for .NET 24.2
Code
void Test()
{
var fontName="SimSun";
var doc = new Aspose.Pdf.Document(@"C:\Users\Administrator\Desktop\test\1.pdf");
doc.Save(@"C:\Users\Administrator\Desktop\test\out.pdf", new Aspose.Pdf.PdfSaveOptions() {
DefaultFontName=fontName // It's OK if you change it to a random and non-existent name.
});
Aspose.Pdf.Text.FontRepository.FindFont(fontName).Dump();
}
Test File
test.zip (388.3 KB)