Skip to content

Commit

Permalink
WF-63564 - Committed the samples for the topics "Annotations", "Compr…
Browse files Browse the repository at this point in the history
…ession", "Forms", "OCR" and "XFA".
  • Loading branch information
SowmiyaLoganathan committed Aug 23, 2022
1 parent af247cb commit a3f5dcb
Show file tree
Hide file tree
Showing 636 changed files with 13,160 additions and 0 deletions.
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.1.32407.343
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Add-URI-annotation-in-a-PDF-document", "Add-URI-annotation-in-a-PDF-document\Add-URI-annotation-in-a-PDF-document.csproj", "{09CD8937-2F0E-4A7A-B94B-39C6A1B2618F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{09CD8937-2F0E-4A7A-B94B-39C6A1B2618F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{09CD8937-2F0E-4A7A-B94B-39C6A1B2618F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{09CD8937-2F0E-4A7A-B94B-39C6A1B2618F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{09CD8937-2F0E-4A7A-B94B-39C6A1B2618F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {60D17E0F-1652-4192-AAC5-66F04CFAE914}
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>net6.0</TargetFramework>
<RootNamespace>Add_URI_annotation_in_a_PDF_document</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Syncfusion.Pdf.NET" Version="20.1.0.61" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// See https://aka.ms/new-console-template for more information

using Syncfusion.Drawing;
using Syncfusion.Pdf;
using Syncfusion.Pdf.Interactive;

//Creates a new PDF document.
PdfDocument document = new PdfDocument();

//Creates a new page.
PdfPage page = document.Pages.Add();

//Creates a new rectangle.
RectangleF rectangle = new RectangleF(10, 40, 30, 30);

//Creates a new Uri Annotation.
PdfUriAnnotation uriAnnotation = new PdfUriAnnotation(rectangle, "http://www.google.com");

//Sets Text to uriAnnotation.
uriAnnotation.Text = "Uri Annotation";

//Adds this annotation to a new page.
page.Annotations.Add(uriAnnotation);

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

//Close the document.
document.Close(true);

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.1.32407.343
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Add-a-3D-annotation-in-PDF-document", "Add-a-3D-annotation-in-PDF-document\Add-a-3D-annotation-in-PDF-document.csproj", "{03B288E4-93EF-461F-9E38-5DE25C68D5ED}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{03B288E4-93EF-461F-9E38-5DE25C68D5ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{03B288E4-93EF-461F-9E38-5DE25C68D5ED}.Debug|Any CPU.Build.0 = Debug|Any CPU
{03B288E4-93EF-461F-9E38-5DE25C68D5ED}.Release|Any CPU.ActiveCfg = Release|Any CPU
{03B288E4-93EF-461F-9E38-5DE25C68D5ED}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {1F8B4CF3-424A-48B9-9D68-B7165A49C1DF}
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>net6.0</TargetFramework>
<RootNamespace>Add_a_3D_annotation_in_PDF_document</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Syncfusion.Pdf.NET" Version="20.1.0.61" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// See https://aka.ms/new-console-template for more information

using Syncfusion.Drawing;
using Syncfusion.Pdf;
using Syncfusion.Pdf.Interactive;

//Creates a new PDF document.
PdfDocument document = new PdfDocument();

//Creates a new page.
PdfPage page = document.Pages.Add();

//Get stream from the U3D file.
FileStream inputStream = new FileStream(Path.GetFullPath("../../../threeLevelHierarchy.u3d"), FileMode.Open, FileAccess.Read);

//Creates a new pdf 3d annotation.
Pdf3DAnnotation pdf3dAnnotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), inputStream);

//Handles the activation of the 3d annotation.
Pdf3DActivation activation = new Pdf3DActivation();
activation.ActivationMode = Pdf3DActivationMode.ExplicitActivation;
activation.ShowToolbar = true;
pdf3dAnnotation.Activation = activation;

//Adds annotation to page
page.Annotations.Add(pdf3dAnnotation);

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

//Close the document.
document.Close(true);
Binary file not shown.
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.1.32407.343
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Add-a-circle-measurement-annotation-to-the-PDF-document", "Add-a-circle-measurement-annotation-to-the-PDF-document\Add-a-circle-measurement-annotation-to-the-PDF-document.csproj", "{AF258848-4556-446B-99A1-91F3D9999D77}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{AF258848-4556-446B-99A1-91F3D9999D77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AF258848-4556-446B-99A1-91F3D9999D77}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AF258848-4556-446B-99A1-91F3D9999D77}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AF258848-4556-446B-99A1-91F3D9999D77}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {502E91A8-426B-4258-9EF1-C6884E79D4A0}
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>net6.0</TargetFramework>
<RootNamespace>Add_a_circle_measurement_annotation_to_the_PDF_document</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Syncfusion.Pdf.NET" Version="20.1.0.61" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// See https://aka.ms/new-console-template for more information

using Syncfusion.Pdf;
using Syncfusion.Pdf.Graphics;
using Syncfusion.Pdf.Interactive;

//Creates a new PDF document.
PdfDocument document = new PdfDocument();

//Creates a new page.
PdfPage page = document.Pages.Add();

Syncfusion.Drawing.RectangleF rect = new Syncfusion.Drawing.RectangleF(10, 100, 100, 100);

//Creates the circle measurement annotation.
PdfCircleMeasurementAnnotation circleMeasureAnnotation = new PdfCircleMeasurementAnnotation(rect);

//Assign author to the circle measurement annotation.
circleMeasureAnnotation.Author = "Syncfusion";

//Assign subject to the circle measurement annotation.
circleMeasureAnnotation.Subject = "Circle measurement annotation";

//Assign color to the square measurement annotation.
circleMeasureAnnotation.Color = new PdfColor(Syncfusion.Drawing.Color.Red);

//Assign measurement unit to the circle measurement annotation.
circleMeasureAnnotation.Unit = PdfMeasurementUnit.Centimeter;

//Sets the measurementType to the circle measurement annotation.
circleMeasureAnnotation.MeasurementType = PdfCircleMeasurementType.Diameter;

//Adds the circle measurement annotation to a page.
page.Annotations.Add(circleMeasureAnnotation);

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

//Close the document.
document.Close(true);
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.1.32407.343
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Add-a-cloud-border-styled-polygon-annotation-in-the-PDF", "Add-a-cloud-border-styled-polygon-annotation-in-the-PDF\Add-a-cloud-border-styled-polygon-annotation-in-the-PDF.csproj", "{ED44258E-6EBF-4118-BF0D-398C75DA4BC6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{ED44258E-6EBF-4118-BF0D-398C75DA4BC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ED44258E-6EBF-4118-BF0D-398C75DA4BC6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ED44258E-6EBF-4118-BF0D-398C75DA4BC6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ED44258E-6EBF-4118-BF0D-398C75DA4BC6}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F43C079A-A07E-46DA-AC5F-4E43D80E2986}
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>net6.0</TargetFramework>
<RootNamespace>Add_a_cloud_border_styled_polygon_annotation_in_the_PDF</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Syncfusion.Pdf.NET" Version="20.1.0.61" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// See https://aka.ms/new-console-template for more information

using Syncfusion.Drawing;
using Syncfusion.Pdf;
using Syncfusion.Pdf.Interactive;

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

//Create a new page.
PdfPage page = document.Pages.Add();

//Create points.
int[] points = new int[] { 100, 300, 150, 200, 300, 200, 350, 300, 300, 400, 150, 400 };

//Create a new polygon annotation.
PdfPolygonAnnotation annotation = new PdfPolygonAnnotation(points, "polygon");

//Assign the borderWidth value.
annotation.Border.BorderWidth = 1;

//Assign the color.
annotation.Color = Color.Red;

//Assign the InnerColor.
annotation.InnerColor = Color.Blue;

//Create a new PdfBorderEffect class.
PdfBorderEffect bordereffect = new PdfBorderEffect();

//Assign the intensity value.
bordereffect.Intensity = 2;

//Assign the cloud style.
bordereffect.Style = PdfBorderEffectStyle.Cloudy;

//Assign the BorderEffect.
annotation.BorderEffect = bordereffect;

//Add the annotation to the page.
page.Annotations.Add(annotation);

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

//Close the document.
document.Close(true);

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.1.32407.343
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Add-a-document-link-annotation-in-PDF-document", "Add-a-document-link-annotation-in-PDF-document\Add-a-document-link-annotation-in-PDF-document.csproj", "{145808CB-4094-4FF6-9943-2D5BE5952B0A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{145808CB-4094-4FF6-9943-2D5BE5952B0A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{145808CB-4094-4FF6-9943-2D5BE5952B0A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{145808CB-4094-4FF6-9943-2D5BE5952B0A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{145808CB-4094-4FF6-9943-2D5BE5952B0A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4631B394-925E-4D13-8AF2-4D72FBA086CC}
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>net6.0</TargetFramework>
<RootNamespace>Add_a_document_link_annotation_in_PDF_document</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Syncfusion.Pdf.NET" Version="20.1.0.61" />
</ItemGroup>

</Project>
Loading

0 comments on commit a3f5dcb

Please sign in to comment.