From bd4fd8b1128cc62be8eb6ffbdd1112d2446d2d7a Mon Sep 17 00:00:00 2001 From: Srihariharan Date: Tue, 9 Jan 2024 11:27:45 +0530 Subject: [PATCH 1/3] 864873 : Added Background color missing issue in HTML Header and Footer sample. --- .../.NET/HTML-Footer-Background-Colour.sln | 25 +++++++++++++++++ .../HTML-Footer-Background-Colour.csproj | 15 ++++++++++ .../HTML-Footer-Background-Colour/Program.cs | 28 +++++++++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 HTML to PDF/Blink/HTML-Footer-Background-Colour/.NET/HTML-Footer-Background-Colour.sln create mode 100644 HTML to PDF/Blink/HTML-Footer-Background-Colour/.NET/HTML-Footer-Background-Colour/HTML-Footer-Background-Colour.csproj create mode 100644 HTML to PDF/Blink/HTML-Footer-Background-Colour/.NET/HTML-Footer-Background-Colour/Program.cs diff --git a/HTML to PDF/Blink/HTML-Footer-Background-Colour/.NET/HTML-Footer-Background-Colour.sln b/HTML to PDF/Blink/HTML-Footer-Background-Colour/.NET/HTML-Footer-Background-Colour.sln new file mode 100644 index 00000000..e3715bda --- /dev/null +++ b/HTML to PDF/Blink/HTML-Footer-Background-Colour/.NET/HTML-Footer-Background-Colour.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.7.34202.233 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HTML-Footer-Background-Colour", "HTML-Footer-Background-Colour\HTML-Footer-Background-Colour.csproj", "{B333B641-9B92-4381-B84B-54F54DDED5B2}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B333B641-9B92-4381-B84B-54F54DDED5B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B333B641-9B92-4381-B84B-54F54DDED5B2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B333B641-9B92-4381-B84B-54F54DDED5B2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B333B641-9B92-4381-B84B-54F54DDED5B2}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {846438BB-6220-4399-BF59-E0AC706E8C52} + EndGlobalSection +EndGlobal diff --git a/HTML to PDF/Blink/HTML-Footer-Background-Colour/.NET/HTML-Footer-Background-Colour/HTML-Footer-Background-Colour.csproj b/HTML to PDF/Blink/HTML-Footer-Background-Colour/.NET/HTML-Footer-Background-Colour/HTML-Footer-Background-Colour.csproj new file mode 100644 index 00000000..3f1cd4b9 --- /dev/null +++ b/HTML to PDF/Blink/HTML-Footer-Background-Colour/.NET/HTML-Footer-Background-Colour/HTML-Footer-Background-Colour.csproj @@ -0,0 +1,15 @@ + + + + Exe + net6.0 + HTML_Footer_Background_Colour + enable + enable + + + + + + + diff --git a/HTML to PDF/Blink/HTML-Footer-Background-Colour/.NET/HTML-Footer-Background-Colour/Program.cs b/HTML to PDF/Blink/HTML-Footer-Background-Colour/.NET/HTML-Footer-Background-Colour/Program.cs new file mode 100644 index 00000000..8e2cc69f --- /dev/null +++ b/HTML to PDF/Blink/HTML-Footer-Background-Colour/.NET/HTML-Footer-Background-Colour/Program.cs @@ -0,0 +1,28 @@ +//Initialize HTML to PDF converter. +using Syncfusion.HtmlConverter; +using Syncfusion.Pdf; +using Syncfusion.Drawing; + +HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(); +//Initialize blink converter settings. +BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings(); +//Set the Blink viewport size. +blinkConverterSettings.ViewPortSize = new Size(1280, 0); +//Set the html margin-top value based on the html header height and margin-top value. +blinkConverterSettings.Margin.Top = 70; +//Set the html margin-bottom value based on the html footer height and margin-bottom value. +blinkConverterSettings.Margin.Bottom = 40; +//Set the custom HTML header to add at the top of each page. +blinkConverterSettings.HtmlHeader = "
HTML Header
"; +//Set the custom HTML footer to add at the bottom of each page. +blinkConverterSettings.HtmlFooter = "
HTML Footer
"; +//Assign Blink converter settings to the HTML converter. +htmlConverter.ConverterSettings = blinkConverterSettings; +//Convert the URL to a PDF document. +PdfDocument document = htmlConverter.Convert("
Hello World
",string.Empty); + +//Create a filestream. +FileStream fileStream = new FileStream("Output.pdf", FileMode.Create, FileAccess.ReadWrite); +//Save and close a PDF document. +document.Save(fileStream); +document.Close(true); \ No newline at end of file From 322383725a5cfaebce2b3eb431a2ba3efd8b110c Mon Sep 17 00:00:00 2001 From: Srihariharan Date: Tue, 9 Jan 2024 12:39:55 +0530 Subject: [PATCH 2/3] 864873 : updated the email version. --- .github/workflows/gitleaks.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gitleaks.yaml b/.github/workflows/gitleaks.yaml index 65843b83..c06178b3 100644 --- a/.github/workflows/gitleaks.yaml +++ b/.github/workflows/gitleaks.yaml @@ -32,7 +32,7 @@ jobs: - name: Install the report tool packages if: steps.gitleaks.outcome != 'success' run: | - nuget install "Syncfusion.Email" -source "https://nexus.syncfusion.com/repository/nuget-hosted/" -ExcludeVersion - dir $GITHUB_WORKSPACE/Syncfusion.Email/lib/netcoreapp3.1 - dotnet $GITHUB_WORKSPACE/Syncfusion.Email/lib/netcoreapp3.1/GitleaksReportMail.dll ${{ secrets.CITEAMCREDENTIALS }} "$GITHUB_REF_NAME" ${{ secrets.NETWORKCREDENTIALS }} ${{ secrets.NETWORKKEY }} "$GITHUB_WORKSPACE" ${{ secrets.ORGANIZATIONNAME }} + nuget install "Syncfusion.Email" -source "https://nexus.syncfusion.com/repository/nuget-hosted/" + dir $GITHUB_WORKSPACE/Syncfusion.Email.1.0.0/lib/netcoreapp3.1 + dotnet $GITHUB_WORKSPACE/Syncfusion.Email.1.0.0/lib/netcoreapp3.1/Email.dll "citeam@syncfusion.com" "$GITHUB_REF_NAME" ${{ secrets.NETWORKCREDENTIALS }} ${{ secrets.NETWORKKEY }} "$GITHUB_WORKSPACE" exit 1 \ No newline at end of file From 55872f15627d137ec875ef64e572dac3b169d1c2 Mon Sep 17 00:00:00 2001 From: Srihariharan Date: Tue, 9 Jan 2024 12:43:45 +0530 Subject: [PATCH 3/3] 864873 : Revamp the email version changes. --- .github/workflows/gitleaks.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gitleaks.yaml b/.github/workflows/gitleaks.yaml index c06178b3..65843b83 100644 --- a/.github/workflows/gitleaks.yaml +++ b/.github/workflows/gitleaks.yaml @@ -32,7 +32,7 @@ jobs: - name: Install the report tool packages if: steps.gitleaks.outcome != 'success' run: | - nuget install "Syncfusion.Email" -source "https://nexus.syncfusion.com/repository/nuget-hosted/" - dir $GITHUB_WORKSPACE/Syncfusion.Email.1.0.0/lib/netcoreapp3.1 - dotnet $GITHUB_WORKSPACE/Syncfusion.Email.1.0.0/lib/netcoreapp3.1/Email.dll "citeam@syncfusion.com" "$GITHUB_REF_NAME" ${{ secrets.NETWORKCREDENTIALS }} ${{ secrets.NETWORKKEY }} "$GITHUB_WORKSPACE" + nuget install "Syncfusion.Email" -source "https://nexus.syncfusion.com/repository/nuget-hosted/" -ExcludeVersion + dir $GITHUB_WORKSPACE/Syncfusion.Email/lib/netcoreapp3.1 + dotnet $GITHUB_WORKSPACE/Syncfusion.Email/lib/netcoreapp3.1/GitleaksReportMail.dll ${{ secrets.CITEAMCREDENTIALS }} "$GITHUB_REF_NAME" ${{ secrets.NETWORKCREDENTIALS }} ${{ secrets.NETWORKKEY }} "$GITHUB_WORKSPACE" ${{ secrets.ORGANIZATIONNAME }} exit 1 \ No newline at end of file