diff --git a/HTML to PDF/IE/HTML-to-PDF-Framework-Footer-Custom-Font/.NET-Framework/HTML-to-PDF-Framework-Footer-Custom-Font.sln b/HTML to PDF/IE/HTML-to-PDF-Framework-Footer-Custom-Font/.NET-Framework/HTML-to-PDF-Framework-Footer-Custom-Font.sln new file mode 100644 index 00000000..cbbfe320 --- /dev/null +++ b/HTML to PDF/IE/HTML-to-PDF-Framework-Footer-Custom-Font/.NET-Framework/HTML-to-PDF-Framework-Footer-Custom-Font.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.9.34723.18 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HTML-to-PDF-Framework-Footer-Custom-Font", "HTML-to-PDF-Framework-Footer-Custom-Font\HTML-to-PDF-Framework-Footer-Custom-Font.csproj", "{DFF2E432-36D2-4AF2-8AA5-C715C9CF0773}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DFF2E432-36D2-4AF2-8AA5-C715C9CF0773}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DFF2E432-36D2-4AF2-8AA5-C715C9CF0773}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DFF2E432-36D2-4AF2-8AA5-C715C9CF0773}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DFF2E432-36D2-4AF2-8AA5-C715C9CF0773}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {FB1E6B03-346E-426C-84B6-45CC1A0277B0} + EndGlobalSection +EndGlobal diff --git a/HTML to PDF/IE/HTML-to-PDF-Framework-Footer-Custom-Font/.NET-Framework/HTML-to-PDF-Framework-Footer-Custom-Font/App.config b/HTML to PDF/IE/HTML-to-PDF-Framework-Footer-Custom-Font/.NET-Framework/HTML-to-PDF-Framework-Footer-Custom-Font/App.config new file mode 100644 index 00000000..a2d15d38 --- /dev/null +++ b/HTML to PDF/IE/HTML-to-PDF-Framework-Footer-Custom-Font/.NET-Framework/HTML-to-PDF-Framework-Footer-Custom-Font/App.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/HTML to PDF/IE/HTML-to-PDF-Framework-Footer-Custom-Font/.NET-Framework/HTML-to-PDF-Framework-Footer-Custom-Font/HTML-to-PDF-Framework-Footer-Custom-Font.csproj b/HTML to PDF/IE/HTML-to-PDF-Framework-Footer-Custom-Font/.NET-Framework/HTML-to-PDF-Framework-Footer-Custom-Font/HTML-to-PDF-Framework-Footer-Custom-Font.csproj new file mode 100644 index 00000000..dd59204f --- /dev/null +++ b/HTML to PDF/IE/HTML-to-PDF-Framework-Footer-Custom-Font/.NET-Framework/HTML-to-PDF-Framework-Footer-Custom-Font/HTML-to-PDF-Framework-Footer-Custom-Font.csproj @@ -0,0 +1,80 @@ + + + + + Debug + AnyCPU + {DFF2E432-36D2-4AF2-8AA5-C715C9CF0773} + Exe + HTML_to_PDF_Framework_Footer_Custom_Font + HTML-to-PDF-Framework-Footer-Custom-Font + v4.6.2 + 512 + true + true + + + + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\Newtonsoft.Json.13.0.2\lib\net45\Newtonsoft.Json.dll + + + ..\packages\Syncfusion.Compression.Base.27.1.57\lib\net462\Syncfusion.Compression.Base.dll + + + ..\packages\Syncfusion.HtmlToPdfConverter.WinForms.27.1.57\lib\net462\Syncfusion.HtmlConverter.Base.dll + + + ..\packages\Syncfusion.Licensing.27.1.57\lib\net462\Syncfusion.Licensing.dll + + + ..\packages\Syncfusion.Pdf.WinForms.27.1.57\lib\net462\Syncfusion.Pdf.Base.dll + + + + + + + + + + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + \ No newline at end of file diff --git a/HTML to PDF/IE/HTML-to-PDF-Framework-Footer-Custom-Font/.NET-Framework/HTML-to-PDF-Framework-Footer-Custom-Font/Program.cs b/HTML to PDF/IE/HTML-to-PDF-Framework-Footer-Custom-Font/.NET-Framework/HTML-to-PDF-Framework-Footer-Custom-Font/Program.cs new file mode 100644 index 00000000..0eb6b622 --- /dev/null +++ b/HTML to PDF/IE/HTML-to-PDF-Framework-Footer-Custom-Font/.NET-Framework/HTML-to-PDF-Framework-Footer-Custom-Font/Program.cs @@ -0,0 +1,41 @@ +using System.Drawing; +using System.IO; +using Syncfusion.HtmlConverter; +using Syncfusion.Pdf; +using Syncfusion.Pdf.Graphics; + +namespace HTML_to_PDF_Framework_Footer_Custom_Font +{ + internal class Program + { + static void Main(string[] args) + { + HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(); + BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings(); + //Create font and brush for footer element. + PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 8); + PdfBrush brush = new PdfSolidBrush(Color.Black); + //Create PDF page template element for footer with bounds. + PdfPageTemplateElement footer = new PdfPageTemplateElement(new RectangleF(0, 0, blinkConverterSettings.PdfPageSize.Width, 50)); + //Create page number field. + PdfPageNumberField pageNumber = new PdfPageNumberField(font, PdfBrushes.Black); + //Create page count field. + PdfPageCountField count = new PdfPageCountField(font, PdfBrushes.Black); + //Add the fields in composite fields. + PdfCompositeField compositeField = new PdfCompositeField(font, PdfBrushes.Black, "Page {0} of {1}", pageNumber, count); + //Draw the composite field in footer + compositeField.Draw(footer.Graphics, PointF.Empty); + //Assign the footer element to PdfFooter of Blink converter settings. + blinkConverterSettings.PdfFooter = footer; + //Set Blink viewport size. + blinkConverterSettings.ViewPortSize = new Size(1024, 0); + htmlConverter.ConverterSettings = blinkConverterSettings; + //Convert URL to PDF. + PdfDocument document = htmlConverter.Convert("https://www.google.com/"); + //Save a PDF document to the file stream. + document.Save("Output.pdf"); + //Close the document. + document.Close(true); + } + } +} diff --git a/HTML to PDF/IE/HTML-to-PDF-Framework-Footer-Custom-Font/.NET-Framework/HTML-to-PDF-Framework-Footer-Custom-Font/Properties/AssemblyInfo.cs b/HTML to PDF/IE/HTML-to-PDF-Framework-Footer-Custom-Font/.NET-Framework/HTML-to-PDF-Framework-Footer-Custom-Font/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..7989a1b7 --- /dev/null +++ b/HTML to PDF/IE/HTML-to-PDF-Framework-Footer-Custom-Font/.NET-Framework/HTML-to-PDF-Framework-Footer-Custom-Font/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("HTML-to-PDF-Framework-Footer-Custom-Font")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("HTML-to-PDF-Framework-Footer-Custom-Font")] +[assembly: AssemblyCopyright("Copyright © 2024")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("dff2e432-36d2-4af2-8aa5-c715c9cf0773")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/HTML to PDF/IE/HTML-to-PDF-Framework-Footer-Custom-Font/.NET-Framework/HTML-to-PDF-Framework-Footer-Custom-Font/packages.config b/HTML to PDF/IE/HTML-to-PDF-Framework-Footer-Custom-Font/.NET-Framework/HTML-to-PDF-Framework-Footer-Custom-Font/packages.config new file mode 100644 index 00000000..6a9722eb --- /dev/null +++ b/HTML to PDF/IE/HTML-to-PDF-Framework-Footer-Custom-Font/.NET-Framework/HTML-to-PDF-Framework-Footer-Custom-Font/packages.config @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file