Browse Source

compdkit(win) - Docs Editor

liuaoran 1 year ago
parent
commit
042f8e87e4

+ 19 - 0
Demo/Examples/Compdfkit_Tools/PageEdit/PageEditControl/PageEditControl.xaml

@@ -0,0 +1,19 @@
+<UserControl x:Class="Compdfkit_Tools.PDFControl.PageEditControl"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"  
+             xmlns:cpdftools="clr-namespace:Compdfkit_Tools.PDFControl"
+             mc:Ignorable="d" 
+             d:DesignHeight="450" d:DesignWidth="800">
+    <Grid>
+        <Grid.RowDefinitions>
+            <RowDefinition Height="auto"></RowDefinition>
+            <RowDefinition></RowDefinition>
+        </Grid.RowDefinitions>
+        <Border x:Name="ToolBarContainer" Height="45" Visibility="Collapsed"  BorderThickness="1" BorderBrush="#1A000000" Background="#F2F3F5">
+            <cpdftools:CPDFPageEditBarControl x:Name="CPDFPageEditBarControl" Height="44"/>
+        </Border>
+        <cpdftools:CPDFPageEditControl x:Name="pageEditControl" Grid.Row="1"></cpdftools:CPDFPageEditControl>
+    </Grid>
+</UserControl>

+ 54 - 0
Demo/Examples/Compdfkit_Tools/PageEdit/PageEditControl/PageEditControl.xaml.cs

@@ -0,0 +1,54 @@
+using ComPDFKitViewer.PdfViewer;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace Compdfkit_Tools.PDFControl
+{
+    public partial class PageEditControl : UserControl
+    {
+        private PDFViewControl _pdfViewControl;
+        public PDFViewControl PDFViewControl
+        {
+            get => _pdfViewControl;
+            set
+            {
+                _pdfViewControl = value;
+                pageEditControl.pdfViewer = _pdfViewControl.PDFView;
+                pageEditControl.LoadThumbnails(pageEditControl.pdfViewer);
+            }
+        }
+
+        //When the order or total number of pages changes
+        public event RoutedEventHandler PageMoved;
+
+        public event EventHandler<bool> OnCanSaveChanged;
+        public event EventHandler OnAnnotEditHandler;
+
+        private double[] zoomLevelList = { 1f, 8f, 12f, 25, 33f, 50, 66f, 75, 100, 125, 150, 200, 300, 400, 600, 800, 1000 };
+        
+        public PageEditControl()
+        {
+            InitializeComponent();
+            this.DataContext = this;
+            pageEditControl.PageMoved -= PageEditControl_PageMoved;
+            pageEditControl.PageMoved += PageEditControl_PageMoved;
+        }
+
+        private void PageEditControl_PageMoved(object sender, RoutedEventArgs e)
+        {
+           PageMoved?.Invoke(this, e);
+        }
+    }
+}

+ 6 - 0
Demo/Examples/DocsEditControl/App.config

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+    <startup> 
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
+    </startup>
+</configuration>

+ 9 - 0
Demo/Examples/DocsEditControl/App.xaml

@@ -0,0 +1,9 @@
+<Application x:Class="DocsEditControl.App"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:local="clr-namespace:DocsEditControl"
+             StartupUri="MainWindow.xaml">
+    <Application.Resources>
+         
+    </Application.Resources>
+</Application>

+ 61 - 0
Demo/Examples/DocsEditControl/App.xaml.cs

@@ -0,0 +1,61 @@
+using ComPDFKit.NativeMethod;
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Reflection;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Xml;
+
+namespace DocsEditControl
+{
+    public class SDKLicenseHelper
+    {
+        public string key = string.Empty;
+        public string secret = string.Empty;
+        public SDKLicenseHelper()
+        {
+
+            string sdkLicensePath = "license_key_win.xml";
+            Assembly assembly = Assembly.GetExecutingAssembly();
+            XmlDocument xmlDocument = new XmlDocument();
+            xmlDocument.Load(sdkLicensePath);
+            var node = xmlDocument.SelectSingleNode("License");
+            if (node != null)
+            {
+                key = node.Attributes["key"].Value;
+                secret = node.Attributes["secret"].Value;
+            }
+        }
+    }
+
+    /// <summary>
+    /// App.xaml 的交互逻辑
+    /// </summary>
+    public partial class App : Application
+    {
+        protected override void OnStartup(StartupEventArgs e)
+        {
+            string str = this.GetType().Assembly.Location;
+            base.OnStartup(e);
+            LicenseVerify();
+        }
+
+        private static bool LicenseVerify()
+        {
+            bool result = false;
+            result = CPDFSDKVerifier.LoadNativeLibrary();
+            if (!result)
+                return false;
+
+            SDKLicenseHelper sdkLicenseHelper = new SDKLicenseHelper();
+
+            LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify(sdkLicenseHelper.key, sdkLicenseHelper.secret);
+            if (verifyResult != LicenseErrorCode.LICENSE_ERR_SUCCESS)
+                return false;
+            return result;
+        }
+    }
+}

+ 130 - 0
Demo/Examples/DocsEditControl/DocsEditControl.csproj

@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{D3003B68-0D1E-47B2-84CA-D6B749BABC74}</ProjectGuid>
+    <OutputType>WinExe</OutputType>
+    <RootNamespace>DocsEditControl</RootNamespace>
+    <AssemblyName>Docs Editor_ComPDFKit</AssemblyName>
+    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <WarningLevel>4</WarningLevel>
+    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+    <Deterministic>true</Deterministic>
+    <NuGetPackageImportStamp>
+    </NuGetPackageImportStamp>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="ComPDFKit.Desk, Version=1.9.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\packages\ComPDFKit.NetFramework.1.9.0\lib\ComPDFKit.Desk.dll</HintPath>
+    </Reference>
+    <Reference Include="ComPDFKit.Viewer, Version=1.9.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\packages\ComPDFKit.NetFramework.1.9.0\lib\ComPDFKit.Viewer.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="System.Net.Http" />
+    <Reference Include="System.Xaml">
+      <RequiredTargetFramework>4.0</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="WindowsBase" />
+    <Reference Include="PresentationCore" />
+    <Reference Include="PresentationFramework" />
+  </ItemGroup>
+  <ItemGroup>
+    <ApplicationDefinition Include="App.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </ApplicationDefinition>
+    <Page Include="MainWindow.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Compile Include="App.xaml.cs">
+      <DependentUpon>App.xaml</DependentUpon>
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="MainWindow.xaml.cs">
+      <DependentUpon>MainWindow.xaml</DependentUpon>
+      <SubType>Code</SubType>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Properties\AssemblyInfo.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Properties\Resources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+    <Compile Include="Properties\Settings.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Settings.settings</DependentUpon>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+    </Compile>
+    <EmbeddedResource Include="Properties\Resources.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+    </EmbeddedResource>
+    <None Include="..\TestFile\PDF32000_2008.pdf">
+      <Link>PDF32000_2008.pdf</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="packages.config" />
+    <None Include="Properties\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="App.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\Compdfkit_Tools\Compdfkit_Tools.csproj">
+      <Project>{9363bcb1-3a67-446a-8093-5708b86bf418}</Project>
+      <Name>Compdfkit_Tools</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\license_key_win.xml">
+      <Link>license_key_win.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <Import Project="..\packages\ComPDFKit.NetFramework.1.9.0\build\ComPDFKit.NetFramework.targets" Condition="Exists('..\packages\ComPDFKit.NetFramework.1.9.0\build\ComPDFKit.NetFramework.targets')" />
+  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+    <PropertyGroup>
+      <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
+    </PropertyGroup>
+    <Error Condition="!Exists('..\packages\ComPDFKit.NetFramework.1.9.0\build\ComPDFKit.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\ComPDFKit.NetFramework.1.9.0\build\ComPDFKit.NetFramework.targets'))" />
+  </Target>
+</Project>

+ 248 - 0
Demo/Examples/DocsEditControl/MainWindow.xaml

@@ -0,0 +1,248 @@
+<Window x:Class="DocsEditControl.MainWindow"
+        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+        xmlns:cpdftools="clr-namespace:Compdfkit_Tools.PDFControl;assembly=Compdfkit_Tools"
+        xmlns:cpdfcommon="clr-namespace:Compdfkit_Tools.Common;assembly=Compdfkit_Tools"
+        xmlns:local="clr-namespace:DocsEditControl"
+        mc:Ignorable="d"
+        Title="MainWindow" Height="450" Width="800">
+    <Window.Resources>
+        <ResourceDictionary>
+            <ResourceDictionary.MergedDictionaries>
+                <ResourceDictionary Source="pack://application:,,,/Compdfkit_Tools;component/Asset/Styles/ToggleButtonStyle.xaml"></ResourceDictionary>
+                <ResourceDictionary Source="pack://application:,,,/Compdfkit_Tools;component/Asset/Styles/ButtonStyle.xaml"></ResourceDictionary>
+                <ResourceDictionary Source="pack://application:,,,/Compdfkit_Tools;component/Asset/Styles/ComboBoxStyle.xaml"></ResourceDictionary>
+            </ResourceDictionary.MergedDictionaries>
+        </ResourceDictionary>
+    </Window.Resources>
+    <Grid>
+        <Grid>
+            <Grid>
+                <Grid.RowDefinitions>
+                    <RowDefinition Height="40"></RowDefinition>
+                    <RowDefinition Height="*"></RowDefinition>
+                </Grid.RowDefinitions>
+                <Border Height="1" Background="LightGray" VerticalAlignment="Bottom"/>
+                <Grid>
+                    <Grid.ColumnDefinitions>
+                        <ColumnDefinition Width="auto"></ColumnDefinition>
+                        <ColumnDefinition Width="*"></ColumnDefinition>
+                        <ColumnDefinition Width="auto"></ColumnDefinition>
+                    </Grid.ColumnDefinitions>
+
+                    <StackPanel Orientation="Horizontal" Height="40" Margin="20,0,0,0">
+                        <Button BorderThickness="0" VerticalContentAlignment="Center" Width="30" Height="30" Style="{StaticResource LightButtonStyle}" Background="Transparent">
+                            <Button.Content>
+                                <Viewbox Width="20" Height="20">
+                                    <Path Fill="#43474D" >
+                                        <Path.Data>
+                                            M3.75,2 L3.91967773,2.00463867 C4.08325195,2.01391602 4.22851562,2.03710938 4.35546875,2.07421875 C4.52473958,2.12369792 
+                                    4.67578125,2.18489583 4.80859375,2.2578125 C4.94140625,2.33072917 5.05989583,2.41145833 5.1640625,2.5 C5.26822917,2.58854167 
+                                    5.37369792,2.66927083 5.48046875,2.7421875 C5.58723958,2.81510417 5.70182292,2.87630208 5.82421875,2.92578125 C5.94661458,2.97526042 
+                                    6.08854167,3 6.25,3 L6.25,3 L12,3 L12.1371528,3.00868056 C12.2262731,3.02025463 12.3107639,3.04340278 12.390625,3.078125 
+                                    C12.5104167,3.13020833 12.6158854,3.20182292 12.7070312,3.29296875 C12.7981771,3.38411458 12.8697917,3.48958333 12.921875,3.609375 
+                                    C12.9739583,3.72916667 13,3.859375 13,4 L13,4 L13,6 L15,6 L15.1332465,6.00868056 C15.2206308,6.02025463 15.3051215,6.04340278 
+                                    15.3867188,6.078125 C15.5091146,6.13020833 15.6158854,6.20182292 15.7070312,6.29296875 C15.7981771,6.38411458 15.8697917,6.48958333 
+                                    15.921875,6.609375 C15.9739583,6.72916667 16,6.85677083 16,6.9921875 C16,7.1484375 15.9635417,7.29947917 15.890625,7.4453125 
+                                    L15.890625,7.4453125 L12.6171875,14 L0,14 L0,3 L0.00868055556,2.86284722 C0.0202546296,2.77372685 0.0434027778,2.68923611 0.078125,2.609375 
+                                    C0.130208333,2.48958333 0.201822917,2.38411458 0.29296875,2.29296875 C0.384114583,2.20182292 0.489583333,2.13020833 0.609375,2.078125 
+                                    C0.729166667,2.02604167 0.859375,2 1,2 L1,2 L3.75,2 Z M15,7 L4.3125,7 L1.3125,13 L12,13 L15,7 Z M3.75,3 L1,3 L1,11.3828125 L3.4140625,6.5546875 
+                                    L3.48706055,6.43261719 C3.56665039,6.31738281 3.66601562,6.22265625 3.78515625,6.1484375 C3.94401042,6.04947917 4.11979167,6 4.3125,6 
+                                    L4.3125,6 L12,6 L12,4 L6.25,4 L6.08032227,3.99536133 C5.91674805,3.98608398 5.77148438,3.96289062 5.64453125,3.92578125 C5.47526042,3.87630208 
+                                    5.32421875,3.81510417 5.19140625,3.7421875 C5.05859375,3.66927083 4.94010417,3.58854167 4.8359375,3.5 C4.73177083,3.41145833 4.62630208,3.33072917 
+                                    4.51953125,3.2578125 C4.41276042,3.18489583 4.29817708,3.12369792 4.17578125,3.07421875 C4.05338542,3.02473958 3.91145833,3 3.75,3 L3.75,3 Z
+                                        </Path.Data>
+                                    </Path>
+                                </Viewbox>
+                            </Button.Content>
+                            <Button.ToolTip>
+                                <ToolTip Content="Open..."></ToolTip>
+                            </Button.ToolTip>
+                        </Button>
+
+                        <Button BorderThickness="0" VerticalContentAlignment="Center" Margin="10,0,0,0" Width="30" Height="30" Style="{StaticResource LightButtonStyle}" Background="Transparent" 
+                             IsEnabled="{Binding CanSave,Mode=OneWay}">
+                            <Button.Content>
+                                <Viewbox Width="20" Height="20">
+                                    <Path Fill="#43474D" >
+                                        <Path.Data>
+                                            M11.707107,1 L15,4.29289322 L15,15 L1,15 L1,1 L11.707107,1 Z M11.293,2 L2,2 L2,14 L4,14 L4,8 L12,8 L12,14 L14,14 L14,4.707 L11.293,2 Z 
+                                        M11,9 L5,9 L5,14 L11,14 L11,9 Z M7,5 L7,6 L4,6 L4,5 L7,5 Z
+                                        </Path.Data>
+                                    </Path>
+                                </Viewbox>
+                            </Button.Content>
+                            <Button.ToolTip>
+                                <ToolTip Content="Save"></ToolTip>
+                            </Button.ToolTip>
+                        </Button>
+                        <ToggleButton Name="LeftToolPanelButton" Margin="13,0,0,0" BorderThickness="0" Width="30" Height="30" Style="{StaticResource ToggleButtonStyle}" Background="Transparent">
+                            <ToggleButton.Content>
+                                <Path Fill="#43474D" Width="30" Height="30">
+                                    <Path.Data>
+                                        M22.5 8.5H7.5V12.25H13H22.5V8.5ZM12.25 13.75H7.5V21.5H12.25V13.75ZM13.75 21.5V13.75H22.5V21.5H13.75ZM7.5 7H6V8.5V21.5V23H7.5H22.5H24V21.5V8.5V7H22.5H7.5Z
+                                    </Path.Data>
+                                </Path>
+                            </ToggleButton.Content>
+                            <ToggleButton.ToolTip>
+                                <ToolTip Content="Panel"></ToolTip>
+                            </ToggleButton.ToolTip>
+                        </ToggleButton>
+
+                        <Line Margin="13,0,13,0" Stroke="#E0E0E0" X1="0" Y1="5" X2="0" Y2="35"></Line>
+
+                        <ToggleButton BorderThickness="0" Width="30" Height="30" Style="{StaticResource ToggleButtonStyle}" Background="Transparent" IsChecked="True" IsEnabled="False" Visibility="Collapsed">
+                            <ToggleButton.Content>
+                                <Path Fill="#43474D">
+                                    <Path.Data>
+                                        M8.7463 7.94055L8.43134 3.20358C8.38986 2.6073 8.82031 2.08322 9.40947 2.01273L9.46546 2.00656C9.75502 1.97416 10.0451 2.06271 10.2681 2.25159C10.4911 
+                                2.44047 10.6276 2.71317 10.6457 3.00614L10.9886 8.17061C10.999 8.31659 11.1097 8.43516 11.2537 8.45444C11.3176 8.46288 11.382 8.44409 11.4315 
+                                8.40258C11.481 8.36108 11.5111 8.30063 11.5145 8.23584L11.7612 3.47595C11.7918 2.85998 12.3116 2.38523 12.923 2.41468H12.9309C13.5429 2.44972 
+                                14.0111 2.97745 13.9773 3.59407L13.7218 8.51438C13.7137 8.66679 13.8235 8.79975 13.9738 8.81936C14.1225 8.83876 14.2625 8.73915 14.2914 
+                                8.59018L14.8006 6.02337C14.9178 5.41517 15.497 5.01851 16.0954 5.13574L16.1041 5.13751C16.7058 5.25854 17.0969 5.84695 16.979 6.45353L16.3684 
+                                9.53687C15.8189 13.3474 15.0586 15.5052 14.3946 16.4246C13.3649 17.8508 11.5573 17.8667 10.1251 17.8667C8.69381 17.8667 7.16012 17.5291 6.44796 
+                                16.9993C5.73492 16.4696 4.77079 15.2575 4.15837 13.9327L4.16712 13.9283C4.11876 13.8639 4.0774 13.7945 4.04376 13.7212L3.105 11.685C2.84552 11.1243 
+                                3.08338 10.4577 3.63781 10.1918L3.64656 10.1874C3.91235 10.0626 4.21656 10.0497 4.49179 10.1517C4.76702 10.2536 4.99055 10.4619 5.11287 10.7304C5.62206 
+                                11.8234 5.94227 12.324 6.07526 12.2324C6.27386 12.0949 6.12075 11.7176 5.85478 9.21249C5.67578 7.53039 5.45319 5.85328 5.18724 4.18289C5.07653 3.5968 
+                                5.44002 3.02581 6.01489 2.88273L6.07526 2.86775C6.35866 2.79957 6.65742 2.85178 6.90147 3.01215C7.14552 3.17252 7.3134 3.42693 7.36572 3.71571L8.168 
+                                8.02341C8.19642 8.17613 8.33897 8.27937 8.49171 8.25787C8.64561 8.23564 8.75656 8.09774 8.7463 7.94143V7.94055Z
+                                    </Path.Data>
+                                </Path>
+                            </ToggleButton.Content>
+                        </ToggleButton>
+
+                        <Line Margin="13,0,13,0" Stroke="#E0E0E0" X1="0" Y1="5" X2="0" Y2="35"></Line>
+                        <cpdftools:CPDFScalingControl x:Name="CPDFSaclingControl"></cpdftools:CPDFScalingControl>
+                    </StackPanel>
+
+                    <ComboBox Width="120" Height="26" Grid.Column="1" HorizontalAlignment="Center" FontSize="14" Foreground="#001A4E">
+                        <ComboBoxItem IsSelected="True">Viewer</ComboBoxItem>
+                    </ComboBox>
+
+                    <StackPanel Orientation="Horizontal" Grid.Column="2">
+
+                        <Button BorderThickness="0" Width="40" Height="40" Style="{StaticResource LightButtonStyle}" Background="Transparent">
+                            <Button.Content>
+                                <Path Fill="#43474D">
+                                    <Path.Data>
+                                        M5.10992 13.9353C2.71184 11.5372 2.71184 7.64917 5.10992 5.25108C7.50801 2.853 11.3961 2.853 13.7942 5.25108C16.1922 7.64917 
+                                16.1922 11.5372 13.7942 13.9353C11.3961 16.3334 7.50801 16.3334 5.10992 13.9353ZM4.04926 4.19042C1.06539 7.17429 1.06539 12.0121 
+                                4.04926 14.996C6.85422 17.8009 11.2975 17.9691 14.2989 15.5005L17.1989 18.4006C17.4918 18.6935 17.9667 18.6935 18.2596 
+                                18.4006C18.5525 18.1077 18.5525 17.6328 18.2596 17.3399L15.3595 14.4399C17.828 11.4384 17.6597 6.99533 14.8548 
+                                4.19042C11.8709 1.20655 7.03313 1.20655 4.04926 4.19042Z
+                                    </Path.Data>
+                                </Path>
+                            </Button.Content>
+                            <Button.ToolTip>
+                                <ToolTip Content="Search"></ToolTip>
+                            </Button.ToolTip>
+                        </Button>
+
+                        <ToggleButton Name="ViewSettingBtn" BorderThickness="0" Width="40" Height="40" Style="{StaticResource ToggleButtonStyle}" Background="Transparent">
+                            <ToggleButton.Content>
+                                <Path Stroke="#43474D" VerticalAlignment="Center" StrokeThickness="2">
+                                    <Path.Data>
+                                        <CombinedGeometry GeometryCombineMode="Exclude">
+                                            <CombinedGeometry.Geometry1>
+                                                M18.3327 10C18.3327 10 14.6017 16.25 9.99935 16.25C5.39698 16.25 1.66602 10 1.66602 10C1.66602 10 5.39698 3.75 9.99935 3.75C14.6017 3.75 18.3327 10 18.3327 10Z
+                                            </CombinedGeometry.Geometry1>
+                                            <CombinedGeometry.Geometry2>
+                                                <EllipseGeometry Center="10,10" RadiusX="2" RadiusY="2"/>
+                                            </CombinedGeometry.Geometry2>
+                                        </CombinedGeometry>
+                                    </Path.Data>
+                                </Path>
+                            </ToggleButton.Content>
+                            <ToggleButton.ToolTip>
+                                <ToolTip Content="Page Display"></ToolTip>
+                            </ToggleButton.ToolTip>
+                        </ToggleButton>
+
+                        <Button BorderThickness="0" Width="40" Height="40" Style="{StaticResource LightButtonStyle}" Background="Transparent">
+                            <Button.Content>
+                                <Path Fill="#43474D" VerticalAlignment="Center">
+                                    <Path.Data>
+                                        M2.75 10C2.75 5.99594 5.99594 2.75 10 2.75C14.0041 2.75 17.25 5.99594 17.25 10C17.25 14.0041 14.0041 17.25 10 
+                                17.25C5.99594 17.25 2.75 14.0041 2.75 10ZM10 1.25C5.16751 1.25 1.25 5.16751 1.25 10C1.25 14.8325 5.16751 
+                                18.75 10 18.75C14.8325 18.75 18.75 14.8325 18.75 10C18.75 5.16751 14.8325 1.25 10 1.25ZM6.5 11C7.05228 11 
+                                7.5 10.5523 7.5 10C7.5 9.44771 7.05228 9 6.5 9C5.94772 9 5.5 9.44771 5.5 10C5.5 10.5523 5.94772 11 6.5 11ZM10 
+                                11C10.5523 11 11 10.5523 11 10C11 9.44771 10.5523 9 10 9C9.44771 9 9 9.44771 9 10C9 10.5523 9.44771 11 10 11ZM14.5 
+                                10C14.5 10.5523 14.0523 11 13.5 11C12.9477 11 12.5 10.5523 12.5 10C12.5 9.44771 12.9477 9 13.5 9C14.0523 9 14.5 9.44771 14.5 10Z
+                                    </Path.Data>
+                                </Path>
+                            </Button.Content>
+                            <Button.ToolTip>
+                                <ToolTip Content="Document Info"></ToolTip>
+                            </Button.ToolTip>
+                        </Button>
+                    </StackPanel>
+                </Grid>
+                <Grid Name="BodyGrid" Grid.Row="1">
+                    <Grid.ColumnDefinitions>
+                        <ColumnDefinition Width="0"></ColumnDefinition>
+                        <ColumnDefinition Width="0"></ColumnDefinition>
+                        <ColumnDefinition Width="*"></ColumnDefinition>
+                        <ColumnDefinition Width="auto"></ColumnDefinition>
+                    </Grid.ColumnDefinitions>
+
+                    <cpdftools:CPDFBOTABarControl Visibility="Collapsed" Name="BotaSideTool"/>
+
+                    <GridSplitter Name="Splitter" Grid.Column="1" Width="15" ResizeBehavior="PreviousAndNext" Visibility="Collapsed">
+                        <GridSplitter.Template>
+                            <ControlTemplate TargetType="{x:Type GridSplitter}">
+                                <Border BorderThickness="{TemplateBinding Border.BorderThickness}"
+                        BorderBrush="{TemplateBinding Border.BorderBrush}"
+                        Background="{TemplateBinding Panel.Background}" >
+                                    <Path Fill="Gray" VerticalAlignment="Center">
+                                        <Path.Data>
+                                            M15 3.75H1V2.25H15V3.75ZM15 8.75H1V7.25H15V8.75ZM1 13.75H15V12.25H1V13.75Z
+                                        </Path.Data>
+                                    </Path>
+                                </Border>
+                            </ControlTemplate>
+                        </GridSplitter.Template>
+                    </GridSplitter>
+
+                    <Grid Grid.Column="2" >
+                        <Border x:Name="PDFGrid" Background="#CECECE"></Border>
+                    </Grid>
+
+                    <Border Name="PropertyContainer" Grid.Column="3" Visibility="Hidden"></Border>
+                </Grid>
+            </Grid>
+
+            <Border Name="PopupBorder" Background="#A0000000" Visibility="Collapsed">
+                <Grid>
+
+                    <Grid Name="FileInfoUI"  Width="422" Height="680" HorizontalAlignment="Center" VerticalAlignment="Center" Background="White" Visibility="Collapsed">
+                        <Grid.ColumnDefinitions>
+                            <ColumnDefinition Width="*"></ColumnDefinition>
+                            <ColumnDefinition Width="*"></ColumnDefinition>
+                        </Grid.ColumnDefinitions>
+                        <Grid.RowDefinitions>
+                            <RowDefinition Height="auto"></RowDefinition>
+                            <RowDefinition Height="*"></RowDefinition>
+                        </Grid.RowDefinitions>
+
+                        <TextBlock Height="20" FontSize="14" LineHeight="16" Margin="12,6,0,0" HorizontalAlignment="Left">Document Info:</TextBlock>
+                        <Button Grid.Column="1" Width="16" Height="16" HorizontalAlignment="Right" Margin="0,8,8,0" BorderThickness="0">
+                            <Button.Content>
+                                <Path Fill="Black">
+                                    <Path.Data>
+                                        M6.69495 6L11.5 1.19495L10.805 0.5L6 5.30505L1.19495 0.5L0.5 1.19495L5.30505 6L0.5 10.805L1.19495 11.5L6 6.69495L10.805 11.5L11.5 10.805L6.69495 6Z
+                                    </Path.Data>
+                                </Path>
+                            </Button.Content>
+                        </Button>
+                        <cpdftools:CPDFInfoControl Grid.Row="1" Margin="25,10,25,0" Grid.ColumnSpan="2" Name="FileInfoControl"></cpdftools:CPDFInfoControl>
+                    </Grid>
+
+                    <cpdfcommon:PasswordDialog x:Name="PasswordUI" Visibility="Collapsed"></cpdfcommon:PasswordDialog>
+                </Grid>
+
+            </Border>
+        </Grid>
+    </Grid>
+</Window>

+ 178 - 0
Demo/Examples/DocsEditControl/MainWindow.xaml.cs

@@ -0,0 +1,178 @@
+using Compdfkit_Tools.Helper;
+using Compdfkit_Tools.PDFControl;
+using ComPDFKitViewer.PdfViewer;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace DocsEditControl
+{
+    public partial class MainWindow : Window, INotifyPropertyChanged
+    {
+        private PDFViewControl pdfViewer;
+        private PDFViewControl passwordViewer;
+        private PageEditControl pageEditControl = new PageEditControl();
+        private CPDFBOTABarControl botaBarControl = new CPDFBOTABarControl();
+
+        public bool CanUndo
+        {
+            get
+            {
+                if (pdfViewer != null && pdfViewer.PDFView != null)
+                {
+                    return pdfViewer.PDFView.UndoManager.CanUndo;
+                }
+                return false;
+            }
+        }
+
+        public bool CanRedo
+        {
+            get
+            {
+                if (pdfViewer != null && pdfViewer.PDFView != null)
+                {
+                    return pdfViewer.PDFView.UndoManager.CanRedo;
+                }
+
+                return false;
+            }
+        }
+
+        private bool _canSave = false;
+        public bool CanSave
+        {
+            get => _canSave;
+            set
+            {
+                _canSave = value;
+                OnPropertyChanged();
+            }
+        }
+          
+        public MainWindow()
+        {
+            InitializeComponent();
+            LoadDefaultDocument();
+        }
+
+        #region Load document
+        private void LoadDefaultDocument()
+        {
+            string defaultFilePath = "PDF32000_2008.pdf";
+            pdfViewer = new PDFViewControl();
+            pdfViewer.PDFView.InitDocument(defaultFilePath);
+            LoadDocument();
+        }
+
+        private void LoadDocument()
+        {
+            pdfViewer.PDFView.Load();
+            pdfViewer.PDFView.SetShowLink(true);
+
+            pdfViewer.PDFView.InfoChanged -= PdfViewer_InfoChanged;
+            pdfViewer.PDFView.InfoChanged += PdfViewer_InfoChanged;
+            PDFGrid.Child = pageEditControl;
+
+            pageEditControl.PDFViewControl = pdfViewer;
+
+            pageEditControl.OnAnnotEditHandler -= PageEditControlRefreshAnnotList;
+            pageEditControl.OnAnnotEditHandler += PageEditControlRefreshAnnotList;
+
+            pageEditControl.PageMoved -= PageEditControl_PageMoved;
+            pageEditControl.PageMoved += PageEditControl_PageMoved;
+
+            PasswordUI.Closed -= PasswordUI_Closed;
+            PasswordUI.Canceled -= PasswordUI_Canceled;
+            PasswordUI.Confirmed -= PasswordUI_Confirmed;
+            PasswordUI.Closed += PasswordUI_Closed;
+            PasswordUI.Canceled += PasswordUI_Canceled;
+            PasswordUI.Confirmed += PasswordUI_Confirmed;
+             
+            CPDFSaclingControl.InitWithPDFViewer(pdfViewer.PDFView);
+            CPDFSaclingControl.SetZoomTextBoxText(string.Format("{0}", (int)(pdfViewer.PDFView.ZoomFactor * 100)));
+
+            ViewSettingBtn.IsChecked = false;
+            botaBarControl.InitWithPDFViewer(pdfViewer.PDFView);
+            botaBarControl.SelectBotaTool(BOTATools.Thumbnail);
+            botaBarControl.AddBOTAContent(BOTATools.Thumbnail | BOTATools.Outline | BOTATools.Bookmark | BOTATools.Search | BOTATools.Annotation);
+        }
+
+        private void PageEditControlRefreshAnnotList(object sender, EventArgs e)
+        {
+            botaBarControl.LoadAnnotationList();
+        }
+
+        private void PasswordUI_Confirmed(object sender, string e)
+        {
+            if (passwordViewer != null && passwordViewer.PDFView != null && passwordViewer.PDFView.Document != null)
+            {
+                passwordViewer.PDFView.Document.UnlockWithPassword(e);
+                if (passwordViewer.PDFView.Document.IsLocked == false)
+                {
+                    PasswordUI.SetShowError("", Visibility.Collapsed);
+                    PasswordUI.ClearPassword();
+                    PasswordUI.Visibility = Visibility.Collapsed;
+                    PopupBorder.Visibility = Visibility.Collapsed;
+                    pdfViewer = passwordViewer;
+                    LoadDocument();
+                }
+                else
+                {
+                    PasswordUI.SetShowError("Wrong Password", Visibility.Visible);
+                }
+            }
+        }
+         
+        private void PasswordUI_Canceled(object sender, EventArgs e)
+        {
+            PopupBorder.Visibility = Visibility.Collapsed;
+            PasswordUI.Visibility = Visibility.Collapsed;
+        }
+
+        private void PasswordUI_Closed(object sender, EventArgs e)
+        {
+            PopupBorder.Visibility = Visibility.Collapsed;
+            PasswordUI.Visibility = Visibility.Collapsed;
+        }
+        #endregion
+
+
+        private void PdfViewer_InfoChanged(object sender, KeyValuePair<string, object> e)
+        {
+            if (e.Key == "Zoom")
+            {
+                CPDFSaclingControl.SetZoomTextBoxText(string.Format("{0}", (int)((double)e.Value * 100)));
+            }
+        }
+
+        private void PageEditControl_PageMoved(object sender, RoutedEventArgs e)
+        {
+            if (pdfViewer == null || pdfViewer.PDFView == null)
+            {
+                return;
+            }
+            BotaSideTool.InitWithPDFViewer(pdfViewer.PDFView);
+        }
+
+        public event PropertyChangedEventHandler PropertyChanged;
+
+        protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
+        {
+            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+        }
+    }
+}

+ 55 - 0
Demo/Examples/DocsEditControl/Properties/AssemblyInfo.cs

@@ -0,0 +1,55 @@
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+// 有关程序集的一般信息由以下
+// 控制。更改这些特性值可修改
+// 与程序集关联的信息。
+[assembly: AssemblyTitle("DocsEditControl")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("DocsEditControl")]
+[assembly: AssemblyCopyright("Copyright ©  2023")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// 将 ComVisible 设置为 false 会使此程序集中的类型
+//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
+//请将此类型的 ComVisible 特性设置为 true。
+[assembly: ComVisible(false)]
+
+//若要开始生成可本地化的应用程序,请设置
+//.csproj 文件中的 <UICulture>CultureYouAreCodingWith</UICulture>
+//例如,如果您在源文件中使用的是美国英语,
+//使用的是美国英语,请将 <UICulture> 设置为 en-US。  然后取消
+//对以下 NeutralResourceLanguage 特性的注释。  更新
+//以下行中的“en-US”以匹配项目文件中的 UICulture 设置。
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+[assembly: ThemeInfo(
+    ResourceDictionaryLocation.None, //主题特定资源词典所处位置
+                                     //(未在页面中找到资源时使用,
+                                     //或应用程序资源字典中找到时使用)
+    ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置
+                                              //(未在页面中找到资源时使用,
+                                              //、应用程序或任何主题专用资源字典中找到时使用)
+)]
+
+
+// 程序集的版本信息由下列四个值组成: 
+//
+//      主版本
+//      次版本
+//      生成号
+//      修订号
+//
+//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
+//通过使用 "*",如下所示:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 71 - 0
Demo/Examples/DocsEditControl/Properties/Resources.Designer.cs

@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     此代码由工具生成。
+//     运行时版本: 4.0.30319.42000
+//
+//     对此文件的更改可能导致不正确的行为,如果
+//     重新生成代码,则所做更改将丢失。
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace DocsEditControl.Properties
+{
+
+
+    /// <summary>
+    ///   强类型资源类,用于查找本地化字符串等。
+    /// </summary>
+    // 此类是由 StronglyTypedResourceBuilder
+    // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
+    // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
+    // (以 /str 作为命令选项),或重新生成 VS 项目。
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class Resources
+    {
+
+        private static global::System.Resources.ResourceManager resourceMan;
+
+        private static global::System.Globalization.CultureInfo resourceCulture;
+
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal Resources()
+        {
+        }
+
+        /// <summary>
+        ///   返回此类使用的缓存 ResourceManager 实例。
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager
+        {
+            get
+            {
+                if ((resourceMan == null))
+                {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DocsEditControl.Properties.Resources", typeof(Resources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+
+        /// <summary>
+        ///   重写当前线程的 CurrentUICulture 属性,对
+        ///   使用此强类型资源类的所有资源查找执行重写。
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture
+        {
+            get
+            {
+                return resourceCulture;
+            }
+            set
+            {
+                resourceCulture = value;
+            }
+        }
+    }
+}

+ 117 - 0
Demo/Examples/DocsEditControl/Properties/Resources.resx

@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 30 - 0
Demo/Examples/DocsEditControl/Properties/Settings.Designer.cs

@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.42000
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace DocsEditControl.Properties
+{
+
+
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+    {
+
+        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+        public static Settings Default
+        {
+            get
+            {
+                return defaultInstance;
+            }
+        }
+    }
+}

+ 7 - 0
Demo/Examples/DocsEditControl/Properties/Settings.settings

@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
+  <Profiles>
+    <Profile Name="(Default)" />
+  </Profiles>
+  <Settings />
+</SettingsFile>

+ 4 - 0
Demo/Examples/DocsEditControl/packages.config

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="ComPDFKit.NetFramework" version="1.9.0" targetFramework="net461" />
+</packages>

+ 1 - 29
Demo/Examples/Examlpes.sln

@@ -46,10 +46,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PDFToImageTest", "Samples\P
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OutlineTest", "Samples\OutlineTest\OutlineTest.csproj", "{7323B63A-6073-4A22-82F5-29023702F2C1}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComPDFKit.Viewer", "..\..\..\compdfkit\ComPDFKit\ComPDFKitDesktop\ComPDFKit.Viewer\ComPDFKit.Viewer.csproj", "{18EC356D-8130-49D4-B4E6-AC290E1065B7}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComPDFKit.Desk", "..\..\..\compdfkit\ComPDFKit\ComPDFKitCSharp\ComPDFKit.Desk.csproj", "{56E518AD-C126-4B48-9A09-0A64C87020E4}"
-EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DocumentInfoTest", "Samples\DocumentInfoTest\DocumentInfoTest.csproj", "{274E1BD3-627D-46BC-8281-5440D7703EBF}"
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WatermarkTest", "Samples\WatermarkTest\WatermarkTest.csproj", "{8E440DCB-FCBC-4308-AB3D-50C38D017A40}"
@@ -158,6 +154,7 @@ Global
 		{9363BCB1-3A67-446A-8093-5708B86BF418}.Release|x86.ActiveCfg = Release|Any CPU
 		{9363BCB1-3A67-446A-8093-5708B86BF418}.Release|x86.Build.0 = Release|Any CPU
 		{807EE747-34A1-4E03-8B72-9E9F6C3BB002}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{807EE747-34A1-4E03-8B72-9E9F6C3BB002}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{807EE747-34A1-4E03-8B72-9E9F6C3BB002}.Debug|x64.ActiveCfg = Debug|Any CPU
 		{807EE747-34A1-4E03-8B72-9E9F6C3BB002}.Debug|x64.Build.0 = Debug|Any CPU
 		{807EE747-34A1-4E03-8B72-9E9F6C3BB002}.Debug|x86.ActiveCfg = Debug|Any CPU
@@ -168,7 +165,6 @@ Global
 		{807EE747-34A1-4E03-8B72-9E9F6C3BB002}.Release|x64.Build.0 = Release|Any CPU
 		{807EE747-34A1-4E03-8B72-9E9F6C3BB002}.Release|x86.ActiveCfg = Release|Any CPU
 		{807EE747-34A1-4E03-8B72-9E9F6C3BB002}.Release|x86.Build.0 = Release|Any CPU
-		{807EE747-34A1-4E03-8B72-9E9F6C3BB002}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{5AF53BD9-A085-4550-8F78-98CCFFFDCDA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{5AF53BD9-A085-4550-8F78-98CCFFFDCDA9}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{5AF53BD9-A085-4550-8F78-98CCFFFDCDA9}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -300,30 +296,6 @@ Global
 		{7323B63A-6073-4A22-82F5-29023702F2C1}.Release|x64.Build.0 = Release|Any CPU
 		{7323B63A-6073-4A22-82F5-29023702F2C1}.Release|x86.ActiveCfg = Release|Any CPU
 		{7323B63A-6073-4A22-82F5-29023702F2C1}.Release|x86.Build.0 = Release|Any CPU
-		{18EC356D-8130-49D4-B4E6-AC290E1065B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{18EC356D-8130-49D4-B4E6-AC290E1065B7}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{18EC356D-8130-49D4-B4E6-AC290E1065B7}.Debug|x64.ActiveCfg = Debug|x64
-		{18EC356D-8130-49D4-B4E6-AC290E1065B7}.Debug|x64.Build.0 = Debug|x64
-		{18EC356D-8130-49D4-B4E6-AC290E1065B7}.Debug|x86.ActiveCfg = Debug|Any CPU
-		{18EC356D-8130-49D4-B4E6-AC290E1065B7}.Debug|x86.Build.0 = Debug|Any CPU
-		{18EC356D-8130-49D4-B4E6-AC290E1065B7}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{18EC356D-8130-49D4-B4E6-AC290E1065B7}.Release|Any CPU.Build.0 = Release|Any CPU
-		{18EC356D-8130-49D4-B4E6-AC290E1065B7}.Release|x64.ActiveCfg = Release|x64
-		{18EC356D-8130-49D4-B4E6-AC290E1065B7}.Release|x64.Build.0 = Release|x64
-		{18EC356D-8130-49D4-B4E6-AC290E1065B7}.Release|x86.ActiveCfg = Release|Any CPU
-		{18EC356D-8130-49D4-B4E6-AC290E1065B7}.Release|x86.Build.0 = Release|Any CPU
-		{56E518AD-C126-4B48-9A09-0A64C87020E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{56E518AD-C126-4B48-9A09-0A64C87020E4}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{56E518AD-C126-4B48-9A09-0A64C87020E4}.Debug|x64.ActiveCfg = Debug|x64
-		{56E518AD-C126-4B48-9A09-0A64C87020E4}.Debug|x64.Build.0 = Debug|x64
-		{56E518AD-C126-4B48-9A09-0A64C87020E4}.Debug|x86.ActiveCfg = Debug|x86
-		{56E518AD-C126-4B48-9A09-0A64C87020E4}.Debug|x86.Build.0 = Debug|x86
-		{56E518AD-C126-4B48-9A09-0A64C87020E4}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{56E518AD-C126-4B48-9A09-0A64C87020E4}.Release|Any CPU.Build.0 = Release|Any CPU
-		{56E518AD-C126-4B48-9A09-0A64C87020E4}.Release|x64.ActiveCfg = Release|x64
-		{56E518AD-C126-4B48-9A09-0A64C87020E4}.Release|x64.Build.0 = Release|x64
-		{56E518AD-C126-4B48-9A09-0A64C87020E4}.Release|x86.ActiveCfg = Release|x86
-		{56E518AD-C126-4B48-9A09-0A64C87020E4}.Release|x86.Build.0 = Release|x86
 		{274E1BD3-627D-46BC-8281-5440D7703EBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{274E1BD3-627D-46BC-8281-5440D7703EBF}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{274E1BD3-627D-46BC-8281-5440D7703EBF}.Debug|x64.ActiveCfg = Debug|Any CPU

+ 1 - 1
Demo/Examples/PDFViewer_new/MainPage.xaml

@@ -4,7 +4,7 @@
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
              xmlns:local="clr-namespace:PDFViewer_new"
-              xmlns:cpdftools="clr-namespace:Compdfkit_Tools.PDFControl;assembly=Compdfkit_Tools"
+             xmlns:cpdftools="clr-namespace:Compdfkit_Tools.PDFControl;assembly=Compdfkit_Tools"
              xmlns:cpdfcommon="clr-namespace:Compdfkit_Tools.Common;assembly=Compdfkit_Tools"
              mc:Ignorable="d" 
              Loaded="MainWindow_Loaded"

+ 1 - 1
Demo/Examples/PDFViewer_new/MainPage.xaml.cs

@@ -47,7 +47,7 @@ namespace PDFViewer_new
             get => _canSave;
             set
             {
-                _canSave = value;
+               _canSave = value;
                 OnPropertyChanged();
             }
         }