diff --git a/README.md b/README.md index 13d26b10..31373912 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # PDFsharp & MigraDoc 6.0 -Version **6.0.0-preview-4** -Published **2023-10-11** +Version **6.0.0** +Published **2023-11-07** -This is the third preview of the **PDFsharp** project, the main project of PDFsharp & MigraDoc 6.0 with updates for C# 10 and .NET 6.0. +This is a stable version of the **PDFsharp** project, the main project of PDFsharp & MigraDoc 6.0 with updates for C# 10 and .NET 6.0. PDFsharp: Copyright (c) 2005-2023 empira Software GmbH, Troisdorf (Cologne Area, Germany) MigraDoc: Copyright (c) 2001-2023 empira Software GmbH, Troisdorf (Cologne Area, Germany) @@ -15,6 +15,8 @@ For more information see [docs.pdfsharp.net](https://docs.pdfsharp.net/) Project documentation can be found on our DOCS site: . +Note: PowerShell 7 or higher is required to execute the PowerShell scripts that come with PDFsharp. + ### Download assets first Assets like bitmaps, fonts, or PDF files are not part of the repository anymore. diff --git a/docs/BoilerplateText.md b/docs/BoilerplateText.md index 3156d0d6..48eec1f2 100644 --- a/docs/BoilerplateText.md +++ b/docs/BoilerplateText.md @@ -63,8 +63,10 @@ MigraDoc is a .NET library that allows developers to create documents such as PD **Release notes** +Note: Do not replicate information from the meta data (like "6.0.0" or "prerelease"). + PDFsharp: -This is a preview version of PDFsharp 6.0.0 using .NET 6. +This is a version of PDFsharp using .NET 6. The package ’PdfSharp’ can be used on any platform including Windows and Linux. The Target Framework is ’net6.0’. The packages ’PDFsharp-gdi’ and ’PDFsharp-wpf’ can be used under Windows only. The Target Framework is ’net6.0-windows’. We also publish packages that contain PDFsharp plus MigraDoc. @@ -73,7 +75,7 @@ https://docs.pdfsharp.net/history/readme-v6.0.html PDFsharp & MigraDoc: -This is a preview version of PDFsharp and MigraDoc Foundation 6.0.0 using .NET 6. +This is a version of PDFsharp and MigraDoc Foundation using .NET 6. The package ’PDFsharp-MigraDoc’ can be used on any platform including Windows and Linux. The Target Framework is ’net6.0’. The packages ’PDFsharp-MigraDoc-GDI’ and ’PDFsharp-MigraDoc-WPF’ can be used under Windows only. The Target Framework is ’net6.0-windows’. See the project docs site for further information: diff --git a/src/foundation/nuget/src/MigraDoc.NuGet-gdi/ReleaseNotes.txt b/src/foundation/nuget/src/MigraDoc.NuGet-gdi/ReleaseNotes.txt index f06f5da0..fb2a8382 100644 --- a/src/foundation/nuget/src/MigraDoc.NuGet-gdi/ReleaseNotes.txt +++ b/src/foundation/nuget/src/MigraDoc.NuGet-gdi/ReleaseNotes.txt @@ -1,4 +1,4 @@ -This is a preview version of PDFsharp and MigraDoc Foundation 6.0.0 using .NET 6. +This is a version of PDFsharp and MigraDoc Foundation using .NET 6. The package ’PDFsharp-MigraDoc’ can be used on any platform including Windows and Linux. The Target Framework is ’net6.0’. The packages ’PDFsharp-MigraDoc-GDI’ and ’PDFsharp-MigraDoc-WPF’ can be used under Windows only. The Target Framework is ’net6.0-windows’. See the project docs site for further information: diff --git a/src/foundation/nuget/src/MigraDoc.NuGet-wpf/ReleaseNotes.txt b/src/foundation/nuget/src/MigraDoc.NuGet-wpf/ReleaseNotes.txt index f06f5da0..fb2a8382 100644 --- a/src/foundation/nuget/src/MigraDoc.NuGet-wpf/ReleaseNotes.txt +++ b/src/foundation/nuget/src/MigraDoc.NuGet-wpf/ReleaseNotes.txt @@ -1,4 +1,4 @@ -This is a preview version of PDFsharp and MigraDoc Foundation 6.0.0 using .NET 6. +This is a version of PDFsharp and MigraDoc Foundation using .NET 6. The package ’PDFsharp-MigraDoc’ can be used on any platform including Windows and Linux. The Target Framework is ’net6.0’. The packages ’PDFsharp-MigraDoc-GDI’ and ’PDFsharp-MigraDoc-WPF’ can be used under Windows only. The Target Framework is ’net6.0-windows’. See the project docs site for further information: diff --git a/src/foundation/nuget/src/MigraDoc.NuGet/ReleaseNotes.txt b/src/foundation/nuget/src/MigraDoc.NuGet/ReleaseNotes.txt index f06f5da0..fb2a8382 100644 --- a/src/foundation/nuget/src/MigraDoc.NuGet/ReleaseNotes.txt +++ b/src/foundation/nuget/src/MigraDoc.NuGet/ReleaseNotes.txt @@ -1,4 +1,4 @@ -This is a preview version of PDFsharp and MigraDoc Foundation 6.0.0 using .NET 6. +This is a version of PDFsharp and MigraDoc Foundation using .NET 6. The package ’PDFsharp-MigraDoc’ can be used on any platform including Windows and Linux. The Target Framework is ’net6.0’. The packages ’PDFsharp-MigraDoc-GDI’ and ’PDFsharp-MigraDoc-WPF’ can be used under Windows only. The Target Framework is ’net6.0-windows’. See the project docs site for further information: diff --git a/src/foundation/nuget/src/PDFsharp.NuGet-gdi/ReleaseNotes.txt b/src/foundation/nuget/src/PDFsharp.NuGet-gdi/ReleaseNotes.txt index 82ed04c4..f7615ebb 100644 --- a/src/foundation/nuget/src/PDFsharp.NuGet-gdi/ReleaseNotes.txt +++ b/src/foundation/nuget/src/PDFsharp.NuGet-gdi/ReleaseNotes.txt @@ -1,4 +1,4 @@ -This is a preview version of PDFsharp 6.0.0 using .NET 6. +This is a version of PDFsharp using .NET 6. The package ’PdfSharp’ can be used on any platform including Windows and Linux. The Target Framework is ’net6.0’. The packages ’PDFsharp-gdi’ and ’PDFsharp-wpf’ can be used under Windows only. The Target Framework is ’net6.0-windows’. We also publish packages that contain PDFsharp plus MigraDoc. diff --git a/src/foundation/nuget/src/PDFsharp.NuGet-wpf/ReleaseNotes.txt b/src/foundation/nuget/src/PDFsharp.NuGet-wpf/ReleaseNotes.txt index 82ed04c4..f7615ebb 100644 --- a/src/foundation/nuget/src/PDFsharp.NuGet-wpf/ReleaseNotes.txt +++ b/src/foundation/nuget/src/PDFsharp.NuGet-wpf/ReleaseNotes.txt @@ -1,4 +1,4 @@ -This is a preview version of PDFsharp 6.0.0 using .NET 6. +This is a version of PDFsharp using .NET 6. The package ’PdfSharp’ can be used on any platform including Windows and Linux. The Target Framework is ’net6.0’. The packages ’PDFsharp-gdi’ and ’PDFsharp-wpf’ can be used under Windows only. The Target Framework is ’net6.0-windows’. We also publish packages that contain PDFsharp plus MigraDoc. diff --git a/src/foundation/nuget/src/PDFsharp.NuGet/ReleaseNotes.txt b/src/foundation/nuget/src/PDFsharp.NuGet/ReleaseNotes.txt index 82ed04c4..f7615ebb 100644 --- a/src/foundation/nuget/src/PDFsharp.NuGet/ReleaseNotes.txt +++ b/src/foundation/nuget/src/PDFsharp.NuGet/ReleaseNotes.txt @@ -1,4 +1,4 @@ -This is a preview version of PDFsharp 6.0.0 using .NET 6. +This is a version of PDFsharp using .NET 6. The package ’PdfSharp’ can be used on any platform including Windows and Linux. The Target Framework is ’net6.0’. The packages ’PDFsharp-gdi’ and ’PDFsharp-wpf’ can be used under Windows only. The Target Framework is ’net6.0-windows’. We also publish packages that contain PDFsharp plus MigraDoc. diff --git a/src/foundation/src/MigraDoc/src/MigraDoc.DocumentObjectModel/DocumentObjectModel/Color.cs b/src/foundation/src/MigraDoc/src/MigraDoc.DocumentObjectModel/DocumentObjectModel/Color.cs index 2d1890b6..07fd5e30 100644 --- a/src/foundation/src/MigraDoc/src/MigraDoc.DocumentObjectModel/DocumentObjectModel/Color.cs +++ b/src/foundation/src/MigraDoc/src/MigraDoc.DocumentObjectModel/DocumentObjectModel/Color.cs @@ -357,9 +357,7 @@ public static Color Parse(string color) var r = color[1..2]; var g = color[2..3]; var b = color[3..4]; - number = "ff" + color.Substring(1, 1) + color.Substring(1, 1) + - color.Substring(2, 1) + color.Substring(2, 1) + - color.Substring(3, 1) + color.Substring(3, 1); + number = "ff" + r + r + g + g + b + b; break; default: throw new ArgumentException(DomSR.InvalidColorString(color), nameof(color)); @@ -434,7 +432,7 @@ public static Color Parse(string color) /// public Color GetMixedTransparencyColor() { - // Think of Empty a the neutral element. + // Think of Empty as the neutral element. if (IsEmpty) return this; diff --git a/src/foundation/src/PDFsharp/src/PdfSharp/Drawing.BarCodes/CodeOmr.cs b/src/foundation/src/PDFsharp/src/PdfSharp/Drawing.BarCodes/CodeOmr.cs index 6ab56666..62836395 100644 --- a/src/foundation/src/PDFsharp/src/PdfSharp/Drawing.BarCodes/CodeOmr.cs +++ b/src/foundation/src/PDFsharp/src/PdfSharp/Drawing.BarCodes/CodeOmr.cs @@ -41,11 +41,7 @@ protected internal override void Render(XGraphics gfx, XBrush brush, XFont? font XPoint pt = position - CodeBase.CalcDistance(AnchorType.TopLeft, Anchor, Size); uint value; UInt32.TryParse(Text, out value); -#if true - // HACK: Project Wallenwein: set LK - value |= 1; - _synchronizeCode = true; -#endif + if (_synchronizeCode) { var rect = new XRect(pt.X, pt.Y, _makerThickness, Size.Height); diff --git a/src/foundation/src/PDFsharp/src/PdfSharp/Pdf/PdfDocument.cs b/src/foundation/src/PDFsharp/src/PdfSharp/Pdf/PdfDocument.cs index c5054814..6022d85d 100644 --- a/src/foundation/src/PDFsharp/src/PdfSharp/Pdf/PdfDocument.cs +++ b/src/foundation/src/PDFsharp/src/PdfSharp/Pdf/PdfDocument.cs @@ -298,7 +298,7 @@ public void Save(Stream stream, bool closeStream) /// /// Saves the document to the specified stream. /// The stream is not closed by this function. - /// (Older versions of PDFsharp closes the stream. That was not very useful.) + /// (Older versions of PDFsharp close the stream. That was not very useful.) /// public void Save(Stream stream) => Save(stream, false); @@ -496,19 +496,19 @@ public int Version /// /// Adjusts the version if the current version is lower than the required version. + /// Version is not adjusted for inconsistent files in ReadOnly mode. /// /// The minimum version number to set version to. /// True, if Version was modified. public bool SetRequiredVersion(int requiredVersion) { - if (requiredVersion > Version) + if (requiredVersion > Version && CanModify) { Version = requiredVersion; return true; } return false; - } ///