-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added the sample-2023 Volume 3 Release
- Loading branch information
1 parent
5efe150
commit 2a5d0c4
Showing
13 changed files
with
223 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
...sting-signed-signature-field/.NET/Get-images-from-the-existing-signed-signature-field.sln
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.6.33417.168 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Get-images-from-the-existing-signed-signature-field", "Get-images-from-the-existing-signed-signature-field\Get-images-from-the-existing-signed-signature-field.csproj", "{A30906C6-E5EF-484B-81D7-EF95CCF50F06}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{A30906C6-E5EF-484B-81D7-EF95CCF50F06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{A30906C6-E5EF-484B-81D7-EF95CCF50F06}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{A30906C6-E5EF-484B-81D7-EF95CCF50F06}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{A30906C6-E5EF-484B-81D7-EF95CCF50F06}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {EA52E8D5-E680-40DD-B3DF-CBC23E1463E7} | ||
EndGlobalSection | ||
EndGlobal |
15 changes: 15 additions & 0 deletions
15
...xisting-signed-signature-field/Get-images-from-the-existing-signed-signature-field.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net7.0</TargetFramework> | ||
<RootNamespace>Get_images_from_the_existing_signed_signature_field</RootNamespace> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Syncfusion.Pdf.Imaging.Net.Core" Version="23.1.36" /> | ||
</ItemGroup> | ||
|
||
</Project> |
Binary file added
BIN
+38.5 KB
...signed-signature-field/.NET/Get-images-from-the-existing-signed-signature-field/Input.pdf
Binary file not shown.
21 changes: 21 additions & 0 deletions
21
...igned-signature-field/.NET/Get-images-from-the-existing-signed-signature-field/Program.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using Syncfusion.Pdf.Interactive; | ||
using Syncfusion.Pdf.Parsing; | ||
|
||
namespace Get_images_from_the_existing_signed_signature_field { | ||
internal class Program { | ||
static void Main(string[] args) { | ||
//Load an existing PDF file. | ||
FileStream fileStream = new FileStream(Path.GetFullPath("../../../Input.pdf"), FileMode.Open, FileAccess.Read); | ||
PdfLoadedDocument ldoc = new PdfLoadedDocument(fileStream); | ||
//Get the existing signed signature field. | ||
PdfLoadedSignatureField loadedSignature = ldoc.Form.Fields[0] as PdfLoadedSignatureField; | ||
//Get the image streams. | ||
Stream[] imageStreams = loadedSignature.GetImages(); | ||
for (int i = 0; i < imageStreams.Length; i++) { | ||
File.WriteAllBytes("Output" + i.ToString() + ".jpg", (imageStreams[i] as MemoryStream).ToArray()); | ||
} | ||
//Close a PDF document. | ||
ldoc.Close(true); | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
HTML to PDF/Blink/HTML-Header-and-Footer/.NET/HTML-Header-and-Footer.sln
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.6.33417.168 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HTML-Header-and-Footer", "HTML-Header-and-Footer\HTML-Header-and-Footer.csproj", "{AE86576C-B426-4EB6-BE05-D07A860BB5B1}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{AE86576C-B426-4EB6-BE05-D07A860BB5B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{AE86576C-B426-4EB6-BE05-D07A860BB5B1}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{AE86576C-B426-4EB6-BE05-D07A860BB5B1}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{AE86576C-B426-4EB6-BE05-D07A860BB5B1}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {666C424D-4703-4323-A2B0-6424B87A7BD1} | ||
EndGlobalSection | ||
EndGlobal |
9 changes: 9 additions & 0 deletions
9
HTML to PDF/Blink/HTML-Header-and-Footer/.NET/HTML-Header-and-Footer/Data/Header.html
Large diffs are not rendered by default.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
HTML to PDF/Blink/HTML-Header-and-Footer/.NET/HTML-Header-and-Footer/Data/footer.html
Large diffs are not rendered by default.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
...DF/Blink/HTML-Header-and-Footer/.NET/HTML-Header-and-Footer/HTML-Header-and-Footer.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net7.0</TargetFramework> | ||
<RootNamespace>HTML_Header_and_Footer</RootNamespace> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Syncfusion.HtmlToPdfConverter.Net.Windows" Version="23.1.36" /> | ||
</ItemGroup> | ||
|
||
</Project> |
37 changes: 37 additions & 0 deletions
37
HTML to PDF/Blink/HTML-Header-and-Footer/.NET/HTML-Header-and-Footer/Program.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using Syncfusion.Drawing; | ||
using Syncfusion.HtmlConverter; | ||
using Syncfusion.Pdf; | ||
|
||
namespace HTML_Header_and_Footer { | ||
internal class Program { | ||
static void Main(string[] args) { | ||
//Initialize HTML to PDF converter. | ||
HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(); | ||
//Initialize blink converter settings. | ||
BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings(); | ||
//Set the Blink viewport size. | ||
blinkConverterSettings.ViewPortSize = new Size(1280, 0); | ||
//Reade the html header and footer text from the html file or you can set html string also. | ||
string headerTemplate = File.ReadAllText(@"..\..\..\Data\header.html"); | ||
string footerTemplate = File.ReadAllText(@"..\..\..\Data\footer.html"); | ||
//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 = headerTemplate; | ||
//Set the custom HTML footer to add at the bottom of each page. | ||
blinkConverterSettings.HtmlFooter = footerTemplate; | ||
//Assign Blink converter settings to the HTML converter. | ||
htmlConverter.ConverterSettings = blinkConverterSettings; | ||
//Convert the URL to a PDF document. | ||
PdfDocument document = htmlConverter.Convert("https://www.syncfusion.com"); | ||
|
||
//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); | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
...document-information/.NET/Remove-specific-keys-from-the-existing-document-information.sln
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.6.33417.168 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Remove-specific-keys-from-the-existing-document-information", "Remove-specific-keys-from-the-existing-document-information\Remove-specific-keys-from-the-existing-document-information.csproj", "{BB4C6EB7-449C-4983-A4BD-A39BFF111859}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{BB4C6EB7-449C-4983-A4BD-A39BFF111859}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{BB4C6EB7-449C-4983-A4BD-A39BFF111859}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{BB4C6EB7-449C-4983-A4BD-A39BFF111859}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{BB4C6EB7-449C-4983-A4BD-A39BFF111859}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {FB82F6AD-BB98-4EDA-9FE7-CD80EA034DBA} | ||
EndGlobalSection | ||
EndGlobal |
Binary file added
BIN
+1.84 KB
...nt-information/.NET/Remove-specific-keys-from-the-existing-document-information/Input.pdf
Binary file not shown.
28 changes: 28 additions & 0 deletions
28
...t-information/.NET/Remove-specific-keys-from-the-existing-document-information/Program.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using Syncfusion.Pdf.Parsing; | ||
|
||
namespace Remove_specific_keys_from_the_existing_document_information { | ||
internal class Program { | ||
static void Main(string[] args) { | ||
//Load an existing PDF document. | ||
FileStream fileStream = new FileStream(Path.GetFullPath("../../../Input.pdf"), FileMode.Open, FileAccess.Read); | ||
PdfLoadedDocument document = new PdfLoadedDocument(fileStream); | ||
//Remove the document information properties. | ||
document.DocumentInformation.Remove("Title"); | ||
document.DocumentInformation.Remove("Author"); | ||
document.DocumentInformation.Remove("Subject"); | ||
document.DocumentInformation.Remove("Keywords"); | ||
document.DocumentInformation.Remove("Creator"); | ||
document.DocumentInformation.Remove("Producer"); | ||
document.DocumentInformation.Remove("ModDate"); | ||
document.DocumentInformation.Remove("CreationDate"); | ||
|
||
//Creating the stream object. | ||
MemoryStream stream = new MemoryStream(); | ||
//Save the document into stream. | ||
document.Save(stream); | ||
File.WriteAllBytes("Output.pdf", stream.ToArray()); | ||
//Close the document. | ||
document.Close(true); | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...g-document-information/Remove-specific-keys-from-the-existing-document-information.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net7.0</TargetFramework> | ||
<RootNamespace>Remove_specific_keys_from_the_existing_document_information</RootNamespace> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Syncfusion.Pdf.Net.Core" Version="23.1.36" /> | ||
</ItemGroup> | ||
|
||
</Project> |