Skip to content

Commit e74952a

Browse files
committed
955040 Added FT page sample link.
1 parent 18d10a9 commit e74952a

42 files changed

Lines changed: 703 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.12.35707.178 d17.12
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Protect-PDF-documents-in-C#", "Protect-PDF-documents-in-C#\Protect-PDF-documents-in-C#.csproj", "{1B2AC0AB-F0B6-4123-9A22-AD59C3A2C1BB}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{1B2AC0AB-F0B6-4123-9A22-AD59C3A2C1BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{1B2AC0AB-F0B6-4123-9A22-AD59C3A2C1BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{1B2AC0AB-F0B6-4123-9A22-AD59C3A2C1BB}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{1B2AC0AB-F0B6-4123-9A22-AD59C3A2C1BB}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
EndGlobal
Binary file not shown.
Binary file not shown.

FT page/Protect-PDF-documents-in-C#/.NET/Protect-PDF-documents-in-C#/Output/gitkeep.txt

Whitespace-only changes.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
using Syncfusion.Pdf.Parsing;
2+
using Syncfusion.Pdf.Security;
3+
4+
// Load the PDF document from a file stream
5+
using (FileStream inputFileStream = new FileStream(Path.GetFullPath(@"Data/Input.pdf"), FileMode.Open, FileAccess.Read))
6+
{
7+
// Load the PDF document
8+
PdfLoadedDocument document = new PdfLoadedDocument(inputFileStream);
9+
// Gets a security object for the document
10+
PdfSecurity security = document.Security;
11+
// Configure key size and encryption algorithm
12+
security.KeySize = PdfEncryptionKeySize.Key256Bit;
13+
security.Algorithm = PdfEncryptionAlgorithm.AES;
14+
// Assign owner and user passwords
15+
security.OwnerPassword = "owner123";
16+
security.UserPassword = "user123";
17+
// Save the PDF document in to a file stream
18+
using (FileStream outputFileStream = new FileStream(Path.GetFullPath(@"Output/Output.pdf"), FileMode.Create, FileAccess.ReadWrite))
19+
{
20+
document.Save(outputFileStream);
21+
}
22+
// Close the document
23+
document.Close(true);
24+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net8.0</TargetFramework>
6+
<RootNamespace>Protect_PDF_documents_in_C_</RootNamespace>
7+
<ImplicitUsings>enable</ImplicitUsings>
8+
<Nullable>enable</Nullable>
9+
</PropertyGroup>
10+
11+
<ItemGroup>
12+
<PackageReference Include="Syncfusion.Pdf.Net.Core" Version="*" />
13+
</ItemGroup>
14+
15+
</Project>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.12.35707.178 d17.12
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Split-PDF-files-in-C#", "Split-PDF-files-in-C#\Split-PDF-files-in-C#.csproj", "{283A1CFF-09CC-44B3-89BA-FABA4425EC4C}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{283A1CFF-09CC-44B3-89BA-FABA4425EC4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{283A1CFF-09CC-44B3-89BA-FABA4425EC4C}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{283A1CFF-09CC-44B3-89BA-FABA4425EC4C}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{283A1CFF-09CC-44B3-89BA-FABA4425EC4C}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
EndGlobal
Binary file not shown.
Binary file not shown.

FT page/Split-PDF-files-in-C#/.NET/Split-PDF-files-in-C#/Output/gitkeep.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)