Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.12.35707.178 d17.12
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Verify-digital-sign-in-existing-PDF", "Verify-digital-sign-in-existing-PDF\Verify-digital-sign-in-existing-PDF.csproj", "{3DD425D8-40B2-4D5E-8ADD-66522B701503}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3DD425D8-40B2-4D5E-8ADD-66522B701503}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3DD425D8-40B2-4D5E-8ADD-66522B701503}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3DD425D8-40B2-4D5E-8ADD-66522B701503}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3DD425D8-40B2-4D5E-8ADD-66522B701503}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using System;
using System.IO;
using System.Reflection.Metadata;
using Syncfusion.Pdf.Parsing;


// Open the signed PDF file for reading
using (FileStream inputFileStream = new FileStream(Path.GetFullPath(@"Data/Input.pdf"), FileMode.Open, FileAccess.Read))
{
// Load the PDF document
PdfLoadedDocument loadedDocument = new PdfLoadedDocument(inputFileStream);

// Check if the document has a form (which would contain signature fields)
if (loadedDocument.Form == null)
{
Console.WriteLine("No signature fields found in the document.");
return;
}

// Iterate through all fields in the form
foreach (var field in loadedDocument.Form.Fields)
{
// Check if the field is a signature field
if (field is PdfLoadedSignatureField signatureField)
{
// Determine whether the signature field is signed or not
string status = signatureField.IsSigned ? "Signed" : "UnSigned";

// Output the result for each signature field
Console.WriteLine($"Signature Field {signatureField.Name} is : {status}");
}
}
//Close the document
loadedDocument.Close(true);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>Verify_digital_sign_in_existing_PDF</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Syncfusion.Pdf.Net.Core" Version="*" />
</ItemGroup>

</Project>
22 changes: 22 additions & 0 deletions Shapes/Dash-pattern-in-shapes/.NET/Dash-pattern-in-shapes.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.12.35707.178 d17.12
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dash-pattern-in-shapes", "Dash-pattern-in-shapes\Dash-pattern-in-shapes.csproj", "{DF549026-34A6-4622-9A1D-8C12AE115DAE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{DF549026-34A6-4622-9A1D-8C12AE115DAE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DF549026-34A6-4622-9A1D-8C12AE115DAE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DF549026-34A6-4622-9A1D-8C12AE115DAE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DF549026-34A6-4622-9A1D-8C12AE115DAE}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>Dash_pattern_in_shapes</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Syncfusion.Pdf.Net.Core" Version="*" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using Syncfusion.Pdf.Graphics;
using Syncfusion.Pdf;
using Syncfusion.Drawing;

// Create a new PDF document
PdfDocument document = new PdfDocument();

// Add a page to the document
PdfPage page = document.Pages.Add();

// Create a PdfGraphics object to draw on the page
PdfGraphics graphics = page.Graphics;

// Create a custom dashed line pattern (5-point dash, 2-point gap)
float[] dashPattern = { 5, 2 }; // Dash length, gap length

// Create a PdfPen with the dash pattern and color
PdfPen dashPen = new PdfPen(PdfBrushes.Black, 2); // 2 is the line width

// Set the DashStyle to Custom before applying DashPattern
dashPen.DashStyle = PdfDashStyle.Custom; // Use Custom style to enable DashPattern
dashPen.DashPattern = dashPattern;

// Draw a line with the custom dash pattern
graphics.DrawLine(dashPen, new Syncfusion.Drawing.PointF(10, 10), new PointF(300, 10));

//Create file stream.
using (FileStream outputFileStream = new FileStream(Path.GetFullPath(@"Output/Output.pdf"), FileMode.Create, FileAccess.ReadWrite))
{
//Save the PDF document to file stream.
document.Save(outputFileStream);
}
//Close the document.
document.Close(true);
Loading