Skip to content

Commit 65e6900

Browse files
committed
added the sample
1 parent a405460 commit 65e6900

4 files changed

Lines changed: 78 additions & 0 deletions

File tree

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.13.35617.110 d17.13
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Enabling-Edit-Option-for-the-PdfComboboxField", "Enabling-Edit-Option-for-the-PdfComboboxField\Enabling-Edit-Option-for-the-PdfComboboxField.csproj", "{B042DC77-96A1-4EA8-9776-6F10B092BE24}"
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+
{B042DC77-96A1-4EA8-9776-6F10B092BE24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{B042DC77-96A1-4EA8-9776-6F10B092BE24}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{B042DC77-96A1-4EA8-9776-6F10B092BE24}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{B042DC77-96A1-4EA8-9776-6F10B092BE24}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {BDBFE219-C7AF-4C85-A096-0F5DCDB0360E}
24+
EndGlobalSection
25+
EndGlobal
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>Enabling_Edit_Option_for_the_PdfComboboxField</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>

Forms/Enabling-Edit-Option-for-the-PdfComboboxField/Enabling-Edit-Option-for-the-PdfComboboxField/Output/.gitkeep

Whitespace-only changes.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
//Create a new PDf document
2+
3+
using Syncfusion.Pdf;
4+
using Syncfusion.Pdf.Graphics;
5+
using Syncfusion.Pdf.Interactive;
6+
using Syncfusion.Drawing;
7+
8+
PdfDocument document = new PdfDocument();
9+
10+
//Creates a new page and adds it as the last page of the document
11+
12+
PdfPage page = document.Pages.Add();
13+
14+
PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
15+
16+
//Create a combo box
17+
18+
PdfComboBoxField positionComboBox = new PdfComboBoxField(page, "positionComboBox");
19+
20+
positionComboBox.Editable = true;
21+
22+
positionComboBox.Bounds = new RectangleF(100, 115, 200, 20);
23+
24+
positionComboBox.Font = font;
25+
26+
positionComboBox.Editable = true;
27+
28+
//Add it to document
29+
30+
document.Form.Fields.Add(positionComboBox);
31+
32+
using (FileStream outputFileStream = new FileStream(Path.GetFullPath(@"../../../Output/Output.pdf"), FileMode.Create, FileAccess.ReadWrite))
33+
{
34+
//Save the PDF document to file stream.
35+
document.Save(outputFileStream);
36+
}
37+
document.Close(true);
38+

0 commit comments

Comments
 (0)