diff --git a/Load and Save/Load font collection in PDF document/LoadFontCollection/LoadFontCollection/Pages/Index.razor b/Load and Save/Load font collection in PDF document/LoadFontCollection/LoadFontCollection/Pages/Index.razor
index c9110bd..499308c 100644
--- a/Load and Save/Load font collection in PDF document/LoadFontCollection/LoadFontCollection/Pages/Index.razor
+++ b/Load and Save/Load font collection in PDF document/LoadFontCollection/LoadFontCollection/Pages/Index.razor
@@ -3,21 +3,18 @@
+
@code {
SfPdfViewer2 pdfViewerRef;
private string DocumentPath { get; set; } = "wwwroot/Data/FontCollection.pdf";
- // Create a new dictionary for fallback fonts
- Dictionary fontCollection = new Dictionary();
- protected override void OnInitialized()
+ public void Created()
{
Stream font = new MemoryStream(System.IO.File.ReadAllBytes("wwwroot/seguiemj.ttf"));
- // Add the Segoe UI Emoji font to the fallback collection
- fontCollection.Add("seguiemj", font);
+ pdfViewerRef.FallbackFontCollection.Add("seguiemj", font);
}
}
\ No newline at end of file