Skip to content

Commit 1775a4d

Browse files
903535- Updated WinForms-PDFViewer-Examples
1 parent c3b4d75 commit 1775a4d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+613
-496
lines changed

Bookmarks Navigation/PDFBookmarks/PDFBookmarks/Form1.cs

+4
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ public Form1()
2525
pdfViewer.DocumentLoaded += PdfViewer_DocumentLoaded;
2626

2727
// load the PDF.
28+
#if NETCOREAPP
29+
pdfViewer.Load("../../../Data/C_Sharp_Succinctly.pdf");
30+
#else
2831
pdfViewer.Load("../../Data/C_Sharp_Succinctly.pdf");
32+
#endif
2933
}
3034

3135
/// <summary>

Bookmarks Navigation/PDFBookmarks/PDFBookmarks/PDFBookmarks.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<AppDesignerFolder>Properties</AppDesignerFolder>
1010
<RootNamespace>SampleWF</RootNamespace>
1111
<AssemblyName>SampleWF</AssemblyName>
12-
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
12+
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
1414
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
1515
</PropertyGroup>
@@ -88,7 +88,7 @@
8888
</ItemGroup>
8989
<ItemGroup>
9090
<PackageReference Include="Syncfusion.PdfViewer.Windows">
91-
<Version>19.3.0.44</Version>
91+
<Version>*</Version>
9292
</PackageReference>
9393
</ItemGroup>
9494
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>WinExe</OutputType>
5+
<TargetFramework>net8.0-windows</TargetFramework>
6+
<Nullable>enable</Nullable>
7+
<ImplicitUsings>enable</ImplicitUsings>
8+
<UseWindowsForms>True</UseWindowsForms>
9+
</PropertyGroup>
10+
11+
<ItemGroup>
12+
<PackageReference Include="Syncfusion.PdfViewer.Windows" Version="*" />
13+
</ItemGroup>
14+
15+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup />
4+
<ItemGroup>
5+
<Compile Update="Form1.cs">
6+
<SubType>Form</SubType>
7+
</Compile>
8+
</ItemGroup>
9+
</Project>
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.10.35122.118
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PDFBookmarks_NET", "PDFBookmarks_NET.csproj", "{E79D712B-0966-4E56-989F-B6A78BE3A022}"
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+
{E79D712B-0966-4E56-989F-B6A78BE3A022}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{E79D712B-0966-4E56-989F-B6A78BE3A022}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{E79D712B-0966-4E56-989F-B6A78BE3A022}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{E79D712B-0966-4E56-989F-B6A78BE3A022}.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 = {66FBE309-FC8F-4FE0-A34F-85576BA23799}
24+
EndGlobalSection
25+
EndGlobal

Bookmarks Navigation/PDFBookmarks/PDFBookmarks/Properties/AssemblyInfo.cs

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
// General Information about an assembly is controlled through the following
66
// set of attributes. Change these attribute values to modify the information
77
// associated with an assembly.
8-
[assembly: AssemblyTitle("SampleWF")]
8+
//[assembly: AssemblyTitle("SampleWF")]
99
[assembly: AssemblyDescription("")]
10-
[assembly: AssemblyConfiguration("")]
11-
[assembly: AssemblyCompany("")]
12-
[assembly: AssemblyProduct("SampleWF")]
10+
//[assembly: AssemblyConfiguration("")]
11+
//[assembly: AssemblyCompany("")]
12+
//[assembly: AssemblyProduct("SampleWF")]
1313
[assembly: AssemblyCopyright("Copyright © 2019")]
1414
[assembly: AssemblyTrademark("")]
1515
[assembly: AssemblyCulture("")]
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.0.0.0")]
36-
[assembly: AssemblyFileVersion("1.0.0.0")]
35+
//[assembly: AssemblyVersion("1.0.0.0")]
36+
//[assembly: AssemblyFileVersion("1.0.0.0")]
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<?xml version="1.0" encoding="utf-8" ?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<startup>
4-
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
55
</startup>
6-
</configuration>
6+
</configuration>

FindText/FindText_Regex/FindText_Regex/FindText_Regex.csproj

+5-10
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@
99
<AppDesignerFolder>Properties</AppDesignerFolder>
1010
<RootNamespace>FindText_Regex</RootNamespace>
1111
<AssemblyName>FindText_Regex</AssemblyName>
12-
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
12+
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
1414
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
15+
<TargetFrameworkProfile />
1516
</PropertyGroup>
1617
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1718
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -33,15 +34,9 @@
3334
<WarningLevel>4</WarningLevel>
3435
</PropertyGroup>
3536
<ItemGroup>
36-
<Reference Include="Syncfusion.Compression.Base, Version=23.1460.36.0, Culture=neutral, processorArchitecture=MSIL">
37-
<HintPath>..\packages\Syncfusion.Compression.Base.23.1.36\lib\net46\Syncfusion.Compression.Base.dll</HintPath>
38-
</Reference>
39-
<Reference Include="Syncfusion.Licensing, Version=23.1460.36.0, Culture=neutral, processorArchitecture=MSIL">
40-
<HintPath>..\packages\Syncfusion.Licensing.23.1.36\lib\net46\Syncfusion.Licensing.dll</HintPath>
41-
</Reference>
42-
<Reference Include="Syncfusion.Pdf.Base, Version=23.1460.36.0, Culture=neutral, processorArchitecture=MSIL">
43-
<HintPath>..\packages\Syncfusion.Pdf.WinForms.23.1.36\lib\net46\Syncfusion.Pdf.Base.dll</HintPath>
44-
</Reference>
37+
<packageReference Include="Syncfusion.Compression.Base" version="*" />
38+
<packageReference Include="Syncfusion.Licensing" version="*" />
39+
<packageReference Include="Syncfusion.Pdf.Base" version="*" />
4540
<Reference Include="System" />
4641
<Reference Include="System.Core" />
4742
<Reference Include="System.Xml.Linq" />
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>WinExe</OutputType>
5+
<TargetFramework>net8.0-windows</TargetFramework>
6+
<Nullable>enable</Nullable>
7+
<ImplicitUsings>enable</ImplicitUsings>
8+
<UseWPF>False</UseWPF>
9+
<UseWindowsForms>True</UseWindowsForms>
10+
</PropertyGroup>
11+
12+
<ItemGroup>
13+
<PackageReference Include="Syncfusion.PdfViewer.WPF" Version="*" />
14+
</ItemGroup>
15+
16+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup />
4+
<ItemGroup>
5+
<Compile Update="Form1.cs">
6+
<SubType>Form</SubType>
7+
</Compile>
8+
</ItemGroup>
9+
</Project>
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.10.35122.118
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FindText_Regex_NET", "FindText_Regex_NET.csproj", "{E79D712B-0966-4E56-989F-B6A78BE3A022}"
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+
{E79D712B-0966-4E56-989F-B6A78BE3A022}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{E79D712B-0966-4E56-989F-B6A78BE3A022}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{E79D712B-0966-4E56-989F-B6A78BE3A022}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{E79D712B-0966-4E56-989F-B6A78BE3A022}.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 = {66FBE309-FC8F-4FE0-A34F-85576BA23799}
24+
EndGlobalSection
25+
EndGlobal

FindText/FindText_Regex/FindText_Regex/Form1.cs

+5-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ public partial class Form1 : Form
1010
public Form1()
1111
{
1212
InitializeComponent();
13-
14-
PdfLoadedDocument loadedDocument = new PdfLoadedDocument(@"../../Data/Bank statement.pdf");
15-
13+
#if NETCOREAPP
14+
PdfLoadedDocument loadedDocument = new PdfLoadedDocument(@"../../../Data/Bank statement.pdf");
15+
#else
16+
PdfLoadedDocument loadedDocument = new PdfLoadedDocument(@"../../Data/Bank statement.pdf");
17+
#endif
1618
// Extract text from the PDF file to get matched texts present in the file based on regex pattern.
1719
string extractedText = string.Empty;
1820
for (int i = 0; i < loadedDocument.Pages.Count; i++)

FindText/FindText_Regex/FindText_Regex/Properties/AssemblyInfo.cs

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
// General Information about an assembly is controlled through the following
66
// set of attributes. Change these attribute values to modify the information
77
// associated with an assembly.
8-
[assembly: AssemblyTitle("FindText_Regex")]
8+
//[assembly: AssemblyTitle("FindText_Regex")]
99
[assembly: AssemblyDescription("")]
10-
[assembly: AssemblyConfiguration("")]
11-
[assembly: AssemblyCompany("")]
12-
[assembly: AssemblyProduct("FindText_Regex")]
10+
//[assembly: AssemblyConfiguration("")]
11+
//[assembly: AssemblyCompany("")]
12+
//[assembly: AssemblyProduct("FindText_Regex")]
1313
[assembly: AssemblyCopyright("Copyright © 2019")]
1414
[assembly: AssemblyTrademark("")]
1515
[assembly: AssemblyCulture("")]
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.0.0.0")]
36-
[assembly: AssemblyFileVersion("1.0.0.0")]
35+
//[assembly: AssemblyVersion("1.0.0.0")]
36+
//[assembly: AssemblyFileVersion("1.0.0.0")]

FindText/FindText_Regex/FindText_Regex/Properties/Resources.Designer.cs

+18-26
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

FindText/FindText_Regex/FindText_Regex/Properties/Settings.Designer.cs

+9-13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Syncfusion.Compression.Base" version="23.1.36" targetFramework="net46" />
4-
<package id="Syncfusion.Licensing" version="23.1.36" targetFramework="net46" />
5-
<package id="Syncfusion.Pdf.WinForms" version="23.1.36" targetFramework="net46" />
3+
<package id="Syncfusion.Compression.Base" version="*" targetFramework="net46" />
4+
<package id="Syncfusion.Licensing" version="*" targetFramework="net46" />
5+
<package id="Syncfusion.Pdf.WinForms" version="*" targetFramework="net46" />
66
</packages>
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<?xml version="1.0" encoding="utf-8" ?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<startup>
4-
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
55
</startup>
6-
</configuration>
6+
</configuration>

How-to/Get-Document-information/PdfDocInfoSample/PdfDocInfoSample/Form1.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@ public Form1()
99
InitializeComponent();
1010

1111
//Loads the PDF document in PDF Viewer
12+
#if NETCOREAPP
13+
pdfViewer.Load("../../../Data/HTTP Succinctly.pdf");
14+
#else
1215
pdfViewer.Load("../../Data/HTTP Succinctly.pdf");
13-
16+
#endif
1417
//Gets the filename of loaded PDF document
1518
string fileName = pdfViewer.DocumentInformation.FileName;
1619

0 commit comments

Comments
 (0)