From 780ec1b452abfe24b19ad6c380fd6cd5230db55b Mon Sep 17 00:00:00 2001 From: Matthew Hawkeye Williamson Date: Tue, 9 Mar 2021 11:54:01 -0600 Subject: [PATCH 1/2] Made certain internal properties of PdfResourceMap and PdfResource public. --- src/PdfSharp/Pdf.Advanced/PdfResourceMap.cs | 6 +++--- src/PdfSharp/Pdf.Advanced/PdfResources.cs | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/PdfSharp/Pdf.Advanced/PdfResourceMap.cs b/src/PdfSharp/Pdf.Advanced/PdfResourceMap.cs index 154b488e..c76d6179 100644 --- a/src/PdfSharp/Pdf.Advanced/PdfResourceMap.cs +++ b/src/PdfSharp/Pdf.Advanced/PdfResourceMap.cs @@ -34,7 +34,7 @@ namespace PdfSharp.Pdf.Advanced /// /// Base class for all dictionaries that map resource names to objects. /// - internal class PdfResourceMap : PdfDictionary //, IEnumerable + public sealed class PdfResourceMap : PdfDictionary //, IEnumerable { public PdfResourceMap() { } @@ -43,7 +43,7 @@ public PdfResourceMap(PdfDocument document) : base(document) { } - protected PdfResourceMap(PdfDictionary dict) + public PdfResourceMap(PdfDictionary dict) : base(dict) { } @@ -61,7 +61,7 @@ protected PdfResourceMap(PdfDictionary dict) /// /// Adds all imported resource names to the specified hashtable. /// - internal void CollectResourceNames(Dictionary usedResourceNames) + public void CollectResourceNames(Dictionary usedResourceNames) { // ?TODO: Imported resources (e.g. fonts) can be reused, but I think this is rather difficult. Will be an issue in PDFsharp 2.0. PdfName[] names = Elements.KeyNames; diff --git a/src/PdfSharp/Pdf.Advanced/PdfResources.cs b/src/PdfSharp/Pdf.Advanced/PdfResources.cs index dd80e591..64b63b85 100644 --- a/src/PdfSharp/Pdf.Advanced/PdfResources.cs +++ b/src/PdfSharp/Pdf.Advanced/PdfResources.cs @@ -185,7 +185,7 @@ public string AddShading(PdfShading shading) /// /// Gets the fonts map. /// - internal PdfResourceMap Fonts + public PdfResourceMap Fonts { get { return _fonts ?? (_fonts = (PdfResourceMap)Elements.GetValue(Keys.Font, VCF.Create)); } } @@ -194,14 +194,14 @@ internal PdfResourceMap Fonts /// /// Gets the external objects map. /// - internal PdfResourceMap XObjects + public PdfResourceMap XObjects { get { return _xObjects ?? (_xObjects = (PdfResourceMap)Elements.GetValue(Keys.XObject, VCF.Create)); } } PdfResourceMap _xObjects; // TODO: make own class - internal PdfResourceMap ExtGStates + public PdfResourceMap ExtGStates { get { @@ -211,28 +211,28 @@ internal PdfResourceMap ExtGStates PdfResourceMap _extGStates; // TODO: make own class - internal PdfResourceMap ColorSpaces + public PdfResourceMap ColorSpaces { get { return _colorSpaces ?? (_colorSpaces = (PdfResourceMap)Elements.GetValue(Keys.ColorSpace, VCF.Create)); } } PdfResourceMap _colorSpaces; // TODO: make own class - internal PdfResourceMap Patterns + public PdfResourceMap Patterns { get { return _patterns ?? (_patterns = (PdfResourceMap) Elements.GetValue(Keys.Pattern, VCF.Create)); } } PdfResourceMap _patterns; // TODO: make own class - internal PdfResourceMap Shadings + public PdfResourceMap Shadings { get { return _shadings ?? (_shadings = (PdfResourceMap) Elements.GetValue(Keys.Shading, VCF.Create)); } } PdfResourceMap _shadings; // TODO: make own class - internal PdfResourceMap Properties + public PdfResourceMap Properties { get {return _properties ?? (_properties = (PdfResourceMap) Elements.GetValue(Keys.Properties, VCF.Create));} } From d24ad5f1b7aecaa7d5052959518febe522b19f40 Mon Sep 17 00:00:00 2001 From: Matthew Hawkeye Williamson Date: Tue, 9 Mar 2021 12:15:20 -0600 Subject: [PATCH 2/2] Updated Product Version to 1.51.5911.0 built release configuration file for local testing. --- src/PdfSharp/Pdf.Advanced/PdfResourceMap.cs | 11 +++++++++++ src/PdfSharp/Pdf.Advanced/PdfResources.cs | 15 +++++++++++++++ src/PdfSharp/root/ProductVersionInfo.cs | 2 +- src/PdfSharp/root/VersionInfo.cs | 2 +- 4 files changed, 28 insertions(+), 2 deletions(-) diff --git a/src/PdfSharp/Pdf.Advanced/PdfResourceMap.cs b/src/PdfSharp/Pdf.Advanced/PdfResourceMap.cs index c76d6179..69803dc8 100644 --- a/src/PdfSharp/Pdf.Advanced/PdfResourceMap.cs +++ b/src/PdfSharp/Pdf.Advanced/PdfResourceMap.cs @@ -36,13 +36,24 @@ namespace PdfSharp.Pdf.Advanced /// public sealed class PdfResourceMap : PdfDictionary //, IEnumerable { + /// + /// Instantiates a new instance of the class. + /// public PdfResourceMap() { } + /// + /// Instantiates a new instance of the class. + /// + /// The public PdfResourceMap(PdfDocument document) : base(document) { } + /// + /// Instantiates a new instance of the class. + /// + /// The public PdfResourceMap(PdfDictionary dict) : base(dict) { } diff --git a/src/PdfSharp/Pdf.Advanced/PdfResources.cs b/src/PdfSharp/Pdf.Advanced/PdfResources.cs index 64b63b85..4ebdf588 100644 --- a/src/PdfSharp/Pdf.Advanced/PdfResources.cs +++ b/src/PdfSharp/Pdf.Advanced/PdfResources.cs @@ -200,6 +200,9 @@ public PdfResourceMap XObjects } PdfResourceMap _xObjects; + /// + /// + /// // TODO: make own class public PdfResourceMap ExtGStates { @@ -210,6 +213,9 @@ public PdfResourceMap ExtGStates } PdfResourceMap _extGStates; + /// + /// + /// // TODO: make own class public PdfResourceMap ColorSpaces { @@ -217,6 +223,9 @@ public PdfResourceMap ColorSpaces } PdfResourceMap _colorSpaces; + /// + /// + /// // TODO: make own class public PdfResourceMap Patterns { @@ -224,6 +233,9 @@ public PdfResourceMap Patterns } PdfResourceMap _patterns; + /// + /// + /// // TODO: make own class public PdfResourceMap Shadings { @@ -231,6 +243,9 @@ public PdfResourceMap Shadings } PdfResourceMap _shadings; + /// + /// + /// // TODO: make own class public PdfResourceMap Properties { diff --git a/src/PdfSharp/root/ProductVersionInfo.cs b/src/PdfSharp/root/ProductVersionInfo.cs index 0e284769..112d836e 100644 --- a/src/PdfSharp/root/ProductVersionInfo.cs +++ b/src/PdfSharp/root/ProductVersionInfo.cs @@ -115,7 +115,7 @@ public static class ProductVersionInfo /// /// The build number of the product. /// - public const string VersionBuild = "5185"; // V16G // Build = days since 2005-01-01 - change this values ONLY HERE + public const string VersionBuild = "5911"; // V16G // Build = days since 2005-01-01 - change this values ONLY HERE /// /// The patch number of the product. diff --git a/src/PdfSharp/root/VersionInfo.cs b/src/PdfSharp/root/VersionInfo.cs index 9fed5912..4204023a 100644 --- a/src/PdfSharp/root/VersionInfo.cs +++ b/src/PdfSharp/root/VersionInfo.cs @@ -32,7 +32,7 @@ namespace PdfSharp /// /// Version info of this assembly. /// - static class VersionInfo + internal static class VersionInfo { public const string Title = ProductVersionInfo.Title; public const string Description = ProductVersionInfo.Description;