-
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.
845229_sample: UG Documentation works for Volume 3 features.
- Loading branch information
1 parent
4e61789
commit c25f56a
Showing
8 changed files
with
118 additions
and
0 deletions.
There are no files selected for viewing
Binary file added
BIN
+1.15 MB
...-revocation-certificate-information-from-digital-signature-embed-timestamp/.NET/Input.pdf
Binary file not shown.
15 changes: 15 additions & 0 deletions
15
...revocation-certificate-information-from-digital-signature-embed-timestamp/.NET/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,15 @@ | ||
// See https://aka.ms/new-console-template for more information | ||
using Syncfusion.Pdf.Parsing; | ||
using Syncfusion.Pdf.Security; | ||
using System.Reflection.Metadata; | ||
//Load a PDF document | ||
FileStream docStream = new FileStream("../../../Input.pdf", FileMode.Open, FileAccess.Read); | ||
PdfLoadedDocument document = new PdfLoadedDocument(docStream); | ||
//Gets the signature field. | ||
PdfLoadedSignatureField signatureField = document.Form.Fields[0] as PdfLoadedSignatureField; | ||
//Validates signature and gets the validation result. | ||
PdfSignatureValidationResult result = signatureField.ValidateSignature(); | ||
//Gets signer certificates | ||
PdfSignerCertificate[] certifcate = result.TimeStampInformation.SignerCertificates; | ||
//Close the document. | ||
document.Close(true); |
15 changes: 15 additions & 0 deletions
15
...ature-embed-timestamp/.NET/Retrieve-certificate-information-from-digital-signature.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>net6.0</TargetFramework> | ||
<RootNamespace>Retrieve_certificate_information_from_digital_signature</RootNamespace> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Syncfusion.Pdf.Net.Core" Version="100.2.183" /> | ||
</ItemGroup> | ||
|
||
</Project> |
25 changes: 25 additions & 0 deletions
25
...ignature-embed-timestamp/.NET/Retrieve-certificate-information-from-digital-signature.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.33829.357 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Retrieve-certificate-information-from-digital-signature", "Retrieve-certificate-information-from-digital-signature.csproj", "{79F1B204-18E8-4702-B47F-16E4E03BDC1E}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{79F1B204-18E8-4702-B47F-16E4E03BDC1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{79F1B204-18E8-4702-B47F-16E4E03BDC1E}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{79F1B204-18E8-4702-B47F-16E4E03BDC1E}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{79F1B204-18E8-4702-B47F-16E4E03BDC1E}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {DAFD465E-7F96-4A9E-A75B-5AD6A73F3116} | ||
EndGlobalSection | ||
EndGlobal |
Binary file added
BIN
+70.1 KB
Redaction/Redact-text-content-alone-on-the-redated-area/.NET-Standard/Input.pdf
Binary file not shown.
22 changes: 22 additions & 0 deletions
22
Redaction/Redact-text-content-alone-on-the-redated-area/.NET-Standard/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,22 @@ | ||
// See https://aka.ms/new-console-template for more information | ||
using Syncfusion.Pdf; | ||
using Syncfusion.Pdf.Parsing; | ||
using Syncfusion.Pdf.Redaction; | ||
using Syncfusion.Drawing; | ||
|
||
FileStream docStream = new FileStream("../../../Input.pdf", FileMode.Open, FileAccess.Read); | ||
PdfLoadedDocument document = new PdfLoadedDocument(docStream); | ||
PdfRedaction redaction = new PdfRedaction(new RectangleF(150, 150, 60, 24), Color.Transparent); | ||
//Only the text within the redaction bounds should be redacted. | ||
redaction.TextOnly = true; | ||
foreach (PdfLoadedPage loadedPage in document.Pages) | ||
{ | ||
loadedPage.AddRedaction(redaction); | ||
} | ||
document.Redact(); | ||
//Save the document | ||
MemoryStream stream = new MemoryStream(); | ||
document.Save(stream); | ||
File.WriteAllBytes("Output.pdf", stream.ToArray()); | ||
//Close the document. | ||
document.Close(true); |
16 changes: 16 additions & 0 deletions
16
...ne-on-the-redated-area/.NET-Standard/Redact-text-content-alone-on-the-redated-area.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,16 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<RootNamespace>Redact_text_content_alone_on_the_redated_area</RootNamespace> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Syncfusion.Pdf.Imaging.Net.Core" Version="100.2.9" /> | ||
<PackageReference Include="Syncfusion.Pdf.Net.Core" Version="100.2.183" /> | ||
</ItemGroup> | ||
|
||
</Project> |
25 changes: 25 additions & 0 deletions
25
...alone-on-the-redated-area/.NET-Standard/Redact-text-content-alone-on-the-redated-area.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.33829.357 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Redact-text-content-alone-on-the-redated-area", "Redact-text-content-alone-on-the-redated-area.csproj", "{277A9C40-8E1A-45B8-A569-0FEFBD6DE7F9}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{277A9C40-8E1A-45B8-A569-0FEFBD6DE7F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{277A9C40-8E1A-45B8-A569-0FEFBD6DE7F9}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{277A9C40-8E1A-45B8-A569-0FEFBD6DE7F9}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{277A9C40-8E1A-45B8-A569-0FEFBD6DE7F9}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {C883D13A-EAC4-4DC9-9C72-F21DEBA8ABE0} | ||
EndGlobalSection | ||
EndGlobal |