Browse Source

Merge branch 'compdfkit_demo_win_dev' of http://git.kdan.cc:8865/Others/kmpdfkit_demo into compdfkit_demo_win_dev

liyijie 7 months ago
parent
commit
ab999da377

+ 2 - 2
Demo/Examples/ComPDFKit.Tool/Properties/AssemblyInfo.cs

@@ -15,5 +15,5 @@ using System.Runtime.InteropServices;
 
 [assembly: Guid("a061ee7a-6704-4bd9-86ee-48ed5df75e2f")]
 
-[assembly: AssemblyVersion("2.1.0.0")]
-[assembly: AssemblyFileVersion("2.1.0.0")]
+[assembly: AssemblyVersion("2.2.0.0")]
+[assembly: AssemblyFileVersion("2.2.0.0")]

+ 1 - 0
Demo/Examples/PDFViewer/MainPage.xaml.cs

@@ -197,6 +197,7 @@ namespace PDFViewer
 
                 pdfviewer.SetLinkHighlight(Properties.Settings.Default.IsHighlightLinkArea);
                 pdfviewer.SetFormFieldHighlight(Properties.Settings.Default.IsHighlightFormArea);
+                pdfviewer.GetDocument().FontSubset = Properties.Settings.Default.FontSubsetting;    
                 pdfviewer.ScrollStride = Properties.Settings.Default.Divisor;
             }
         }

+ 13 - 1
Demo/Examples/PDFViewer/Properties/Settings.Designer.cs

@@ -12,7 +12,7 @@ namespace PDFViewer.Properties {
     
     
     [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.9.0.0")]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.10.0.0")]
     internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
         
         private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@@ -138,5 +138,17 @@ namespace PDFViewer.Properties {
                 this["AnnotationAuthor"] = value;
             }
         }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("False")]
+        public bool FontSubsetting {
+            get {
+                return ((bool)(this["FontSubsetting"]));
+            }
+            set {
+                this["FontSubsetting"] = value;
+            }
+        }
     }
 }

+ 3 - 0
Demo/Examples/PDFViewer/Properties/Settings.settings

@@ -32,5 +32,8 @@
     <Setting Name="AnnotationAuthor" Type="System.String" Scope="User">
       <Value Profile="(Default)" />
     </Setting>
+    <Setting Name="FontSubsetting" Type="System.Boolean" Scope="User">
+      <Value Profile="(Default)">False</Value>
+    </Setting>
   </Settings>
 </SettingsFile>

+ 6 - 2
Demo/Examples/PDFViewer/SettingsDialog.xaml

@@ -6,7 +6,7 @@
         xmlns:local="clr-namespace:PDFViewer"
         xmlns:common="clr-namespace:ComPDFKit.Controls.Common;assembly=ComPDFKit.Controls"
         mc:Ignorable="d"
-        Title="Settings" Height="680" Width="440"
+        Title="Settings" Height="700" Width="440"
         ShowInTaskbar="False"
         WindowStartupLocation="CenterScreen"
         ResizeMode="NoResize"
@@ -104,7 +104,7 @@
     <Grid Margin="24,0,24,0">
         <Grid.RowDefinitions>
             <RowDefinition Height="166"></RowDefinition>
-            <RowDefinition Height="150"></RowDefinition>
+            <RowDefinition Height="190"></RowDefinition>
             <RowDefinition Height="35"></RowDefinition>
             <RowDefinition Height="45"/>
             <RowDefinition Height="180"></RowDefinition>
@@ -139,6 +139,10 @@
                     <TextBlock Text="{Binding  ConverterParameter=Setting_HighlightForms, Converter={StaticResource ResourceConverter}}" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
                     <ToggleButton x:Name="HighlightFormTog" Click="HighlightFormTog_Click" Style="{StaticResource SliderSwitchToggleButtonStyle}" Height="32" HorizontalAlignment="Right"></ToggleButton>
                 </Grid>
+                <Grid Margin="0,0,0,8" Height="32">
+                    <TextBlock Text="{Binding ConverterParameter=Setting_FontSubset, Converter={StaticResource ResourceConverter}}" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
+                    <ToggleButton x:Name="FontSubsettingTog" Click="FontSubsettingTog_Click" Style="{StaticResource SliderSwitchToggleButtonStyle}" Height="32" HorizontalAlignment="Right"></ToggleButton>
+                </Grid>
                 <Grid Margin="0,0,0,8" Height="32">
                     <TextBlock Text="{Binding  ConverterParameter=Setting_Divisor, Converter={StaticResource ResourceConverter}}" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
                     <common:NumericUpDownControl x:Name="DivisorTxb" Unit="%" Minimum="1" Maximum="100" Width="118" Height="32" HorizontalAlignment="Right"></common:NumericUpDownControl>

+ 6 - 0
Demo/Examples/PDFViewer/SettingsDialog.xaml.cs

@@ -57,6 +57,7 @@ namespace PDFViewer
         {
             HighlightFormTog.IsChecked = Properties.Settings.Default.IsHighlightFormArea;
             HighlightLinkTog.IsChecked = Properties.Settings.Default.IsHighlightLinkArea;
+            FontSubsettingTog.IsChecked = Properties.Settings.Default.FontSubsetting;
             AuthorTxb.Text = Properties.Settings.Default.DocumentAuthor;
             AnnotatorTxb.Text = Properties.Settings.Default.AnnotationAuthor;
             SelectCurrentLanguage();
@@ -118,5 +119,10 @@ namespace PDFViewer
         {
             Properties.Settings.Default.AnnotationAuthor = AnnotatorTxb.Text;
         }
+
+        private void FontSubsettingTog_Click(object sender, RoutedEventArgs e)
+        {
+            Properties.Settings.Default.FontSubsetting = FontSubsettingTog.IsChecked.Value;
+        }
     }
 }

+ 9 - 0
Demo/Examples/PDFViewer/Strings/SettingDialog.Designer.cs

@@ -114,6 +114,15 @@ namespace PDFViewer.Strings {
             }
         }
         
+        /// <summary>
+        ///   Looks up a localized string similar to Font Subsetting.
+        /// </summary>
+        internal static string Setting_FontSubset {
+            get {
+                return ResourceManager.GetString("Setting_FontSubset", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   Looks up a localized string similar to Highlight Form Fields.
         /// </summary>

+ 3 - 0
Demo/Examples/PDFViewer/Strings/SettingDialog.resx

@@ -180,4 +180,7 @@
   <data name="Setting_Annotator" xml:space="preserve">
     <value> Annotation Creator</value>
   </data>
+  <data name="Setting_FontSubset" xml:space="preserve">
+    <value>Font Subsetting</value>
+  </data>
 </root>

+ 3 - 0
Demo/Examples/PDFViewer/Strings/SettingDialog.zh.resx

@@ -180,4 +180,7 @@
   <data name="Setting_Annotator" xml:space="preserve">
     <value>注释创建者</value>
   </data>
+  <data name="Setting_FontSubset" xml:space="preserve">
+    <value>字体子集化</value>
+  </data>
 </root>