From 5ac03f266eef8d5fff088fb472ccc2f37484e01b Mon Sep 17 00:00:00 2001 From: sameerkhan001 Date: Fri, 24 Oct 2025 18:08:55 +0530 Subject: [PATCH 1/2] 260304: Added sample project for Enable Cache font. --- .../Program.cs | 1 - .../Program.cs | 1 - .../Program.cs | 1 - .../Program.cs | 1 - .../Program.cs | 1 - .../Program.cs | 1 - ...isabling-Font-Caching-with-EnableCache.sln | 25 +++++++++++++++++++ ...bling-Font-Caching-with-EnableCache.csproj | 15 +++++++++++ .../Output/gitkeep.txt | 0 .../Program.cs | 24 ++++++++++++++++++ 10 files changed, 64 insertions(+), 6 deletions(-) create mode 100644 Text/Disabling-Font-Caching-with-EnableCache/.NET/Disabling-Font-Caching-with-EnableCache.sln create mode 100644 Text/Disabling-Font-Caching-with-EnableCache/.NET/Disabling-Font-Caching-with-EnableCache/Disabling-Font-Caching-with-EnableCache.csproj create mode 100644 Text/Disabling-Font-Caching-with-EnableCache/.NET/Disabling-Font-Caching-with-EnableCache/Output/gitkeep.txt create mode 100644 Text/Disabling-Font-Caching-with-EnableCache/.NET/Disabling-Font-Caching-with-EnableCache/Program.cs diff --git a/Table/PdfGrid/Add-different-font-style-for-particular-table-cell/.NET/Add-different-font-style-for-particular-table-cell/Program.cs b/Table/PdfGrid/Add-different-font-style-for-particular-table-cell/.NET/Add-different-font-style-for-particular-table-cell/Program.cs index 5e3acc05..9c86702f 100644 --- a/Table/PdfGrid/Add-different-font-style-for-particular-table-cell/.NET/Add-different-font-style-for-particular-table-cell/Program.cs +++ b/Table/PdfGrid/Add-different-font-style-for-particular-table-cell/.NET/Add-different-font-style-for-particular-table-cell/Program.cs @@ -2,7 +2,6 @@ using Syncfusion.Pdf.Grid; using Syncfusion.Pdf; using Syncfusion.Drawing; -using System.Reflection.Metadata; //Create a new PDF document. using (PdfDocument document = new PdfDocument()) diff --git a/Table/PdfGrid/Add-the-background-image-in-a-PDF-table-cell/.NET/Add-the-background-image-in-a-PDF-table-cell/Program.cs b/Table/PdfGrid/Add-the-background-image-in-a-PDF-table-cell/.NET/Add-the-background-image-in-a-PDF-table-cell/Program.cs index d2c9880f..0a9ec466 100644 --- a/Table/PdfGrid/Add-the-background-image-in-a-PDF-table-cell/.NET/Add-the-background-image-in-a-PDF-table-cell/Program.cs +++ b/Table/PdfGrid/Add-the-background-image-in-a-PDF-table-cell/.NET/Add-the-background-image-in-a-PDF-table-cell/Program.cs @@ -2,7 +2,6 @@ using Syncfusion.Pdf.Grid; using Syncfusion.Pdf; using Syncfusion.Drawing; -using System.Reflection.Metadata; //Create a new PDF document. PdfDocument pdfDocument = new PdfDocument(); diff --git a/Table/PdfGrid/Create-nested-table-in-a-PDF-document/.NET/Create-nested-table-in-a-PDF-document/Program.cs b/Table/PdfGrid/Create-nested-table-in-a-PDF-document/.NET/Create-nested-table-in-a-PDF-document/Program.cs index 1ed22b4f..1ae8317f 100644 --- a/Table/PdfGrid/Create-nested-table-in-a-PDF-document/.NET/Create-nested-table-in-a-PDF-document/Program.cs +++ b/Table/PdfGrid/Create-nested-table-in-a-PDF-document/.NET/Create-nested-table-in-a-PDF-document/Program.cs @@ -1,7 +1,6 @@ using Syncfusion.Pdf.Grid; using Syncfusion.Pdf; using Syncfusion.Drawing; -using System.Reflection.Metadata; //Create a new PDF document. using (PdfDocument document = new PdfDocument()) diff --git a/Table/PdfGrid/Draw-HTML-styled-text-in-a-PDF-table-cell/.NET/Draw-HTML-styled-text-in-a-PDF-table-cell/Program.cs b/Table/PdfGrid/Draw-HTML-styled-text-in-a-PDF-table-cell/.NET/Draw-HTML-styled-text-in-a-PDF-table-cell/Program.cs index 8d1f2c32..43438630 100644 --- a/Table/PdfGrid/Draw-HTML-styled-text-in-a-PDF-table-cell/.NET/Draw-HTML-styled-text-in-a-PDF-table-cell/Program.cs +++ b/Table/PdfGrid/Draw-HTML-styled-text-in-a-PDF-table-cell/.NET/Draw-HTML-styled-text-in-a-PDF-table-cell/Program.cs @@ -2,7 +2,6 @@ using Syncfusion.Pdf.Graphics; using Syncfusion.Pdf.Grid; using Syncfusion.Drawing; -using System.Reflection.Metadata; //Create a new PDF document. using (PdfDocument document = new PdfDocument()) diff --git a/Table/PdfGrid/Draw-borderless-table-in-PDF-document/.NET/Draw-borderless-table-in-PDF-document/Program.cs b/Table/PdfGrid/Draw-borderless-table-in-PDF-document/.NET/Draw-borderless-table-in-PDF-document/Program.cs index 1e09fd91..4d9a43b7 100644 --- a/Table/PdfGrid/Draw-borderless-table-in-PDF-document/.NET/Draw-borderless-table-in-PDF-document/Program.cs +++ b/Table/PdfGrid/Draw-borderless-table-in-PDF-document/.NET/Draw-borderless-table-in-PDF-document/Program.cs @@ -2,7 +2,6 @@ using Syncfusion.Pdf.Grid; using Syncfusion.Pdf; using Syncfusion.Drawing; -using System.Reflection.Metadata; //Create a new PDF document. using (PdfDocument document = new PdfDocument()) diff --git a/Table/PdfGrid/Insert-image-in-a-particular-table-cell/.NET/Insert-image-in-a-particular-table-cell/Program.cs b/Table/PdfGrid/Insert-image-in-a-particular-table-cell/.NET/Insert-image-in-a-particular-table-cell/Program.cs index 0a596c3e..ef2a3750 100644 --- a/Table/PdfGrid/Insert-image-in-a-particular-table-cell/.NET/Insert-image-in-a-particular-table-cell/Program.cs +++ b/Table/PdfGrid/Insert-image-in-a-particular-table-cell/.NET/Insert-image-in-a-particular-table-cell/Program.cs @@ -2,7 +2,6 @@ using Syncfusion.Pdf.Grid; using Syncfusion.Pdf; using Syncfusion.Drawing; -using System.Reflection.Metadata; //Create a new PDF document. using (PdfDocument document = new PdfDocument()) diff --git a/Text/Disabling-Font-Caching-with-EnableCache/.NET/Disabling-Font-Caching-with-EnableCache.sln b/Text/Disabling-Font-Caching-with-EnableCache/.NET/Disabling-Font-Caching-with-EnableCache.sln new file mode 100644 index 00000000..4f266245 --- /dev/null +++ b/Text/Disabling-Font-Caching-with-EnableCache/.NET/Disabling-Font-Caching-with-EnableCache.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.14.36616.10 d17.14 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Disabling-Font-Caching-with-EnableCache", "Disabling-Font-Caching-with-EnableCache\Disabling-Font-Caching-with-EnableCache.csproj", "{92C54F48-8703-4E32-810B-04C869DF545C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {92C54F48-8703-4E32-810B-04C869DF545C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {92C54F48-8703-4E32-810B-04C869DF545C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {92C54F48-8703-4E32-810B-04C869DF545C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {92C54F48-8703-4E32-810B-04C869DF545C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {325DD53E-879D-40D7-9F48-6A67B8EB5E33} + EndGlobalSection +EndGlobal diff --git a/Text/Disabling-Font-Caching-with-EnableCache/.NET/Disabling-Font-Caching-with-EnableCache/Disabling-Font-Caching-with-EnableCache.csproj b/Text/Disabling-Font-Caching-with-EnableCache/.NET/Disabling-Font-Caching-with-EnableCache/Disabling-Font-Caching-with-EnableCache.csproj new file mode 100644 index 00000000..5fa2cb3c --- /dev/null +++ b/Text/Disabling-Font-Caching-with-EnableCache/.NET/Disabling-Font-Caching-with-EnableCache/Disabling-Font-Caching-with-EnableCache.csproj @@ -0,0 +1,15 @@ + + + + Exe + net8.0 + Disabling_Font_Caching_with_EnableCache + enable + enable + + + + + + + diff --git a/Text/Disabling-Font-Caching-with-EnableCache/.NET/Disabling-Font-Caching-with-EnableCache/Output/gitkeep.txt b/Text/Disabling-Font-Caching-with-EnableCache/.NET/Disabling-Font-Caching-with-EnableCache/Output/gitkeep.txt new file mode 100644 index 00000000..e69de29b diff --git a/Text/Disabling-Font-Caching-with-EnableCache/.NET/Disabling-Font-Caching-with-EnableCache/Program.cs b/Text/Disabling-Font-Caching-with-EnableCache/.NET/Disabling-Font-Caching-with-EnableCache/Program.cs new file mode 100644 index 00000000..864e87a0 --- /dev/null +++ b/Text/Disabling-Font-Caching-with-EnableCache/.NET/Disabling-Font-Caching-with-EnableCache/Program.cs @@ -0,0 +1,24 @@ +using Syncfusion.Drawing; +using Syncfusion.Pdf; +using Syncfusion.Pdf.Graphics; + +//Create a new document. +using (PdfDocument document = new PdfDocument()) +{ + //Diable the font cache + PdfDocument.EnableCache = false; + + //Creates a new page and adds it as the last page of the document + PdfPage page = document.Pages.Add(); + //Create Pdf graphics for the page + PdfGraphics graphics = page.Graphics; + //Create a solid brush + PdfBrush brush = new PdfSolidBrush(Color.Black); + float fontSize = 20f; + //Set the font + PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, fontSize); + //Draw the text + graphics.DrawString("Hello world!", font, brush, new PointF(20, 20)); + //Save the PDF document + document.Save(Path.GetFullPath(@"Output/Output.pdf")); +} \ No newline at end of file From 4fd539979c018be5380bbe72665607cc2c4dea91 Mon Sep 17 00:00:00 2001 From: sameerkhan001 Date: Fri, 24 Oct 2025 18:24:13 +0530 Subject: [PATCH 2/2] 260304: Removed sample. --- ...isabling-Font-Caching-with-EnableCache.sln | 25 ------------------- ...bling-Font-Caching-with-EnableCache.csproj | 15 ----------- .../Output/gitkeep.txt | 0 .../Program.cs | 24 ------------------ 4 files changed, 64 deletions(-) delete mode 100644 Text/Disabling-Font-Caching-with-EnableCache/.NET/Disabling-Font-Caching-with-EnableCache.sln delete mode 100644 Text/Disabling-Font-Caching-with-EnableCache/.NET/Disabling-Font-Caching-with-EnableCache/Disabling-Font-Caching-with-EnableCache.csproj delete mode 100644 Text/Disabling-Font-Caching-with-EnableCache/.NET/Disabling-Font-Caching-with-EnableCache/Output/gitkeep.txt delete mode 100644 Text/Disabling-Font-Caching-with-EnableCache/.NET/Disabling-Font-Caching-with-EnableCache/Program.cs diff --git a/Text/Disabling-Font-Caching-with-EnableCache/.NET/Disabling-Font-Caching-with-EnableCache.sln b/Text/Disabling-Font-Caching-with-EnableCache/.NET/Disabling-Font-Caching-with-EnableCache.sln deleted file mode 100644 index 4f266245..00000000 --- a/Text/Disabling-Font-Caching-with-EnableCache/.NET/Disabling-Font-Caching-with-EnableCache.sln +++ /dev/null @@ -1,25 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.14.36616.10 d17.14 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Disabling-Font-Caching-with-EnableCache", "Disabling-Font-Caching-with-EnableCache\Disabling-Font-Caching-with-EnableCache.csproj", "{92C54F48-8703-4E32-810B-04C869DF545C}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {92C54F48-8703-4E32-810B-04C869DF545C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {92C54F48-8703-4E32-810B-04C869DF545C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {92C54F48-8703-4E32-810B-04C869DF545C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {92C54F48-8703-4E32-810B-04C869DF545C}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {325DD53E-879D-40D7-9F48-6A67B8EB5E33} - EndGlobalSection -EndGlobal diff --git a/Text/Disabling-Font-Caching-with-EnableCache/.NET/Disabling-Font-Caching-with-EnableCache/Disabling-Font-Caching-with-EnableCache.csproj b/Text/Disabling-Font-Caching-with-EnableCache/.NET/Disabling-Font-Caching-with-EnableCache/Disabling-Font-Caching-with-EnableCache.csproj deleted file mode 100644 index 5fa2cb3c..00000000 --- a/Text/Disabling-Font-Caching-with-EnableCache/.NET/Disabling-Font-Caching-with-EnableCache/Disabling-Font-Caching-with-EnableCache.csproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - Exe - net8.0 - Disabling_Font_Caching_with_EnableCache - enable - enable - - - - - - - diff --git a/Text/Disabling-Font-Caching-with-EnableCache/.NET/Disabling-Font-Caching-with-EnableCache/Output/gitkeep.txt b/Text/Disabling-Font-Caching-with-EnableCache/.NET/Disabling-Font-Caching-with-EnableCache/Output/gitkeep.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/Text/Disabling-Font-Caching-with-EnableCache/.NET/Disabling-Font-Caching-with-EnableCache/Program.cs b/Text/Disabling-Font-Caching-with-EnableCache/.NET/Disabling-Font-Caching-with-EnableCache/Program.cs deleted file mode 100644 index 864e87a0..00000000 --- a/Text/Disabling-Font-Caching-with-EnableCache/.NET/Disabling-Font-Caching-with-EnableCache/Program.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Syncfusion.Drawing; -using Syncfusion.Pdf; -using Syncfusion.Pdf.Graphics; - -//Create a new document. -using (PdfDocument document = new PdfDocument()) -{ - //Diable the font cache - PdfDocument.EnableCache = false; - - //Creates a new page and adds it as the last page of the document - PdfPage page = document.Pages.Add(); - //Create Pdf graphics for the page - PdfGraphics graphics = page.Graphics; - //Create a solid brush - PdfBrush brush = new PdfSolidBrush(Color.Black); - float fontSize = 20f; - //Set the font - PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, fontSize); - //Draw the text - graphics.DrawString("Hello world!", font, brush, new PointF(20, 20)); - //Save the PDF document - document.Save(Path.GetFullPath(@"Output/Output.pdf")); -} \ No newline at end of file