Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3f24965

Browse files
upgrade to dot net 8
1 parent ec7d84a commit 3f24965

File tree

7 files changed

+36
-142
lines changed

7 files changed

+36
-142
lines changed
Lines changed: 10 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,17 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1+
<Project Sdk="Microsoft.NET.Sdk">
42
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{9D565609-F065-490A-BC29-3B2F740539A7}</ProjectGuid>
3+
<TargetFramework>net8.0</TargetFramework>
84
<OutputType>Exe</OutputType>
9-
<RootNamespace>GetCheckboxCheckedValue</RootNamespace>
10-
<AssemblyName>GetCheckboxCheckedValue</AssemblyName>
11-
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
12-
<FileAlignment>512</FileAlignment>
13-
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
5+
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
6+
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
147
</PropertyGroup>
158
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
16-
<PlatformTarget>AnyCPU</PlatformTarget>
17-
<DebugSymbols>true</DebugSymbols>
18-
<DebugType>full</DebugType>
19-
<Optimize>false</Optimize>
20-
<OutputPath>bin\Debug\</OutputPath>
21-
<DefineConstants>DEBUG;TRACE</DefineConstants>
22-
<ErrorReport>prompt</ErrorReport>
23-
<WarningLevel>4</WarningLevel>
24-
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
9+
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
2510
</PropertyGroup>
26-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
27-
<PlatformTarget>AnyCPU</PlatformTarget>
28-
<DebugType>pdbonly</DebugType>
29-
<Optimize>true</Optimize>
30-
<OutputPath>bin\Release\</OutputPath>
31-
<DefineConstants>TRACE</DefineConstants>
32-
<ErrorReport>prompt</ErrorReport>
33-
<WarningLevel>4</WarningLevel>
34-
</PropertyGroup>
35-
<ItemGroup>
36-
<Reference Include="DevExpress.Drawing.v24.2, Version=24.2.5.0">
37-
<SpecificVersion>False</SpecificVersion>
38-
</Reference>
39-
<Reference Include="DevExpress.Printing.v24.2.Core, Version=24.2.5.0">
40-
<SpecificVersion>False</SpecificVersion>
41-
</Reference>
42-
<Reference Include="DevExpress.Data.v24.2, Version=24.2.5.0">
43-
<SpecificVersion>False</SpecificVersion>
44-
</Reference>
45-
<Reference Include="DevExpress.Docs.v24.2, Version=24.2.5.0">
46-
<SpecificVersion>False</SpecificVersion>
47-
</Reference>
48-
<Reference Include="DevExpress.Pdf.v24.2.Core, Version=24.2.5.0">
49-
<SpecificVersion>False</SpecificVersion>
50-
</Reference>
51-
<Reference Include="DevExpress.Pdf.v24.2.Drawing, Version=24.2.5.0">
52-
<SpecificVersion>False</SpecificVersion>
53-
</Reference>
54-
<Reference Include="PresentationFramework" />
55-
<Reference Include="System" />
56-
<Reference Include="System.Core" />
57-
<Reference Include="System.Drawing" />
58-
<Reference Include="System.Security" />
59-
<Reference Include="System.Xml.Linq" />
60-
<Reference Include="System.Data.DataSetExtensions" />
61-
<Reference Include="Microsoft.CSharp" />
62-
<Reference Include="System.Data" />
63-
<Reference Include="System.Net.Http" />
64-
<Reference Include="System.Xml" />
65-
</ItemGroup>
66-
<ItemGroup>
67-
<Compile Include="Program.cs" />
68-
<Compile Include="Properties\AssemblyInfo.cs" />
69-
</ItemGroup>
7011
<ItemGroup>
71-
<None Include="App.config" />
12+
<PackageReference Include="DevExpress.Document.Processor" Version="24.2.5" />
13+
<PackageReference Include="DevExpress.Drawing.Skia" Version="24.2.5" />
14+
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
15+
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
7216
</ItemGroup>
73-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
74-
</Project>
17+
</Project>

‎CS/GetCheckboxCheckedValue/Program.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using DevExpress.Pdf;
2+
using System.Diagnostics;
23

34
namespace GetCheckboxCheckedValue
45
{
@@ -9,7 +10,7 @@ static void Main(string[] args)
910
{
1011
// Load a document with an interactive form.
1112
PdfDocumentProcessor processor = new PdfDocumentProcessor();
12-
processor.LoadDocument("..\\..\\InteractiveForm.pdf");
13+
processor.LoadDocument("..\\..\\..\\InteractiveForm.pdf");
1314

1415
PdfDocumentFacade documentFacade = processor.DocumentFacade;
1516
PdfAcroFormFacade acroForm = documentFacade.AcroForm;
@@ -21,7 +22,9 @@ static void Main(string[] args)
2122
genderField.IsChecked = true;
2223

2324
// Save the modified document.
24-
processor.SaveDocument("..\\..\\Result.pdf");
25+
processor.SaveDocument("..\\..\\..\\Result.pdf");
26+
27+
Process.Start(new ProcessStartInfo("..\\..\\..\\Result.pdf") { UseShellExecute = true });
2528
}
2629

2730
}

‎CS/GetCheckboxCheckedValue/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System.Reflection;
2-
using System.Runtime.CompilerServices;
32
using System.Runtime.InteropServices;
43

54
// General Information about an assembly is controlled through the following

‎Readme.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,20 @@
44
[![](https://img.shields.io/badge/📖_How_to_use_DevExpress_Examples-e9f6fc?style=flat-square)](https://docs.devexpress.com/GeneralInformation/403183)
55
[![](https://img.shields.io/badge/💬_Leave_Feedback-feecdd?style=flat-square)](#does-this-example-address-your-development-requirementsobjectives)
66
<!-- default badges end -->
7-
<!-- default file list -->
8-
*Files to look at*:
97

10-
* [Program.cs](./CS/GetCheckboxCheckedValue/Program.cs) (VB: [Program.vb](./VB/GetCheckboxCheckedValue/Program.vb))
11-
<!-- default file list end -->
128
# PDF Document API - Obtain a Checked Appearance Name for a Check Box
139

14-
<strong>Note:</strong> with the 21.1 major release, the <b>PdfDocumentFacade</b> class allows you to change the PDF document without access to its inner structure. Use the <b>PdfDocumentFacade.AcroForm</b> property to get interactive form field options. You can change form field and appearance properties.
10+
This example shows how to get a checked appearance name for the "Female" check box and check the check box with this value.
11+
12+
the `PdfDocumentFacade` class allows you to change the PDF document without access to its inner structure. Use the [PdfDocumentFacade.AcroForm](https://docs.devexpress.com/OfficeFileAPI/DevExpress.Pdf.PdfDocumentFacade.AcroForm) property to get interactive form field options. You can change form field and appearance properties.
1513

16-
This example shows how to get a checked appearance name for the "Female" check box and check the check box with this value.<br><br>To accomplish this task, call the <strong>GetCheckboxCheckedValue</strong> method using a<a href="https://documentation.devexpress.com/DocumentServer/DevExpress.Pdf.PdfDocumentProcessor.class"> PdfDocumentProcessor</a> instance and the field name. <br><br>To obtain interactive form data, call the <a href="https://documentation.devexpress.com/DocumentServer/DevExpress.Pdf.PdfDocumentProcessor.GetFormData.method">PdfDocumentProcessor.GetFormData </a>method. To check the "Female" check box, use the <a href="https://documentation.devexpress.com/CoreLibraries/DevExpress.Pdf.PdfFormData.Value.property">PdfFormData.Value</a> property.
14+
## Files to Review
15+
16+
* [Program.cs](./CS/GetCheckboxCheckedValue/Program.cs) (VB: [Program.vb](./VB/GetCheckboxCheckedValue/Program.vb))
1717

18-
<br/>
18+
## Documentation
1919

20+
* [Interactive Forms in PDF Documents](https://docs.devexpress.com/OfficeFileAPI/118284/pdf-document-api/interactive-forms)
2021

2122
<!-- feedback -->
2223
## Does this example address your development requirements/objectives?
Lines changed: 10 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,23 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1+
<Project Sdk="Microsoft.NET.Sdk">
42
<PropertyGroup>
5-
<OptionInfer>On</OptionInfer>
6-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
7-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
8-
<ProjectGuid>{9D565609-F065-490A-BC29-3B2F740539A7}</ProjectGuid>
3+
<TargetFramework>net472</TargetFramework>
94
<OutputType>Exe</OutputType>
105
<RootNamespace></RootNamespace>
11-
<AssemblyName>GetCheckboxCheckedValue</AssemblyName>
12-
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
13-
<FileAlignment>512</FileAlignment>
14-
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
6+
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
7+
<UseWPF>true</UseWPF>
8+
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
159
</PropertyGroup>
1610
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17-
<PlatformTarget>AnyCPU</PlatformTarget>
18-
<DebugSymbols>true</DebugSymbols>
19-
<DebugType>full</DebugType>
20-
<Optimize>false</Optimize>
21-
<OutputPath>bin\Debug\</OutputPath>
2211
<DefineConstants>DEBUG,TRACE</DefineConstants>
23-
<ErrorReport>prompt</ErrorReport>
2412
<WarningLevel>4</WarningLevel>
25-
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
2613
</PropertyGroup>
2714
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
28-
<PlatformTarget>AnyCPU</PlatformTarget>
29-
<DebugType>pdbonly</DebugType>
30-
<Optimize>true</Optimize>
31-
<OutputPath>bin\Release\</OutputPath>
32-
<DefineConstants>TRACE</DefineConstants>
33-
<ErrorReport>prompt</ErrorReport>
3415
<WarningLevel>4</WarningLevel>
3516
</PropertyGroup>
3617
<ItemGroup>
37-
<Reference Include="DevExpress.Drawing.v24.2, Version=24.2.5.0">
38-
<SpecificVersion>False</SpecificVersion>
39-
</Reference>
40-
<Reference Include="DevExpress.Printing.v24.2.Core, Version=24.2.5.0">
41-
<SpecificVersion>False</SpecificVersion>
42-
</Reference>
43-
<Reference Include="DevExpress.Data.v24.2, Version=24.2.5.0">
44-
<SpecificVersion>False</SpecificVersion>
45-
</Reference>
46-
<Reference Include="DevExpress.Docs.v24.2, Version=24.2.5.0">
47-
<SpecificVersion>False</SpecificVersion>
48-
</Reference>
49-
<Reference Include="DevExpress.Pdf.v24.2.Core, Version=24.2.5.0">
50-
<SpecificVersion>False</SpecificVersion>
51-
</Reference>
52-
<Reference Include="DevExpress.Pdf.v24.2.Drawing, Version=24.2.5.0">
53-
<SpecificVersion>False</SpecificVersion>
54-
</Reference>
55-
<Reference Include="PresentationFramework" />
56-
<Reference Include="System" />
57-
<Reference Include="System.Core" />
58-
<Reference Include="System.Drawing" />
59-
<Reference Include="System.Security" />
60-
<Reference Include="System.Xml.Linq" />
61-
<Reference Include="System.Data.DataSetExtensions" />
62-
<Reference Include="Microsoft.CSharp" />
63-
<Reference Include="System.Data" />
64-
<Reference Include="System.Net.Http" />
65-
<Reference Include="System.Xml" />
18+
<PackageReference Include="DevExpress.Document.Processor" Version="24.2.5" />
19+
<PackageReference Include="DevExpress.Drawing.Skia" Version="24.2.5" />
20+
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
21+
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
6622
</ItemGroup>
67-
<ItemGroup>
68-
<Compile Include="Program.vb" />
69-
<Compile Include="Properties\AssemblyInfo.vb" />
70-
</ItemGroup>
71-
<ItemGroup>
72-
<None Include="App.config" />
73-
</ItemGroup>
74-
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
75-
</Project>
23+
</Project>

‎VB/GetCheckboxCheckedValue/Program.vb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ Namespace GetCheckboxCheckedValue
77
Shared Sub Main(ByVal args As String())
88
' Load a document with an interactive form.
99
Dim processor As PdfDocumentProcessor = New PdfDocumentProcessor()
10-
processor.LoadDocument("..\..\InteractiveForm.pdf")
10+
processor.LoadDocument("..\..\..\InteractiveForm.pdf")
1111
Dim documentFacade As PdfDocumentFacade = processor.DocumentFacade
1212
Dim acroForm As PdfAcroFormFacade = documentFacade.AcroForm
1313
' Obtain the check box form field:
1414
Dim genderField As PdfCheckBoxFormFieldFacade = acroForm.GetCheckBoxFormField("Female")
1515
' Specify a checked value for the Female form field:
1616
genderField.IsChecked = True
1717
' Save the modified document.
18-
processor.SaveDocument("..\..\Result.pdf")
18+
processor.SaveDocument("..\..\..\Result.pdf")
1919
End Sub
2020
End Class
2121
End Namespace

‎config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"runOnWeb": false,
3-
"autoGenerateVb": true
3+
"autoGenerateVb": false
44
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /