Skip to content

Commit b748631

Browse files
committed
1 parent a8fe909 commit b748631

File tree

11 files changed

+21
-23
lines changed

11 files changed

+21
-23
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# PDFsharp & MigraDoc 6.0
22

3-
Version **6.0.0-preview-4**
4-
Published **2023-10-11**
3+
Version **6.0.0**
4+
Published **2023-11-07**
55

6-
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.
6+
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.
77

88
PDFsharp: Copyright (c) 2005-2023 empira Software GmbH, Troisdorf (Cologne Area, Germany)
99
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/)
1515

1616
Project documentation can be found on our DOCS site: <https://docs.pdfsharp.net>.
1717

18+
Note: PowerShell 7 or higher is required to execute the PowerShell scripts that come with PDFsharp.
19+
1820
### Download assets first
1921

2022
Assets like bitmaps, fonts, or PDF files are not part of the repository anymore.

docs/BoilerplateText.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,10 @@ MigraDoc is a .NET library that allows developers to create documents such as PD
6363

6464
**Release notes**
6565

66+
Note: Do not replicate information from the meta data (like "6.0.0" or "prerelease").
67+
6668
PDFsharp:
67-
This is a preview version of PDFsharp 6.0.0 using .NET 6.
69+
This is a version of PDFsharp using .NET 6.
6870
The package ’PdfSharp’ can be used on any platform including Windows and Linux. The Target Framework is ’net6.0’.
6971
The packages ’PDFsharp-gdi’ and ’PDFsharp-wpf’ can be used under Windows only. The Target Framework is ’net6.0-windows’.
7072
We also publish packages that contain PDFsharp plus MigraDoc.
@@ -73,7 +75,7 @@ https://docs.pdfsharp.net/history/readme-v6.0.html
7375

7476

7577
PDFsharp & MigraDoc:
76-
This is a preview version of PDFsharp and MigraDoc Foundation 6.0.0 using .NET 6.
78+
This is a version of PDFsharp and MigraDoc Foundation using .NET 6.
7779
The package ’PDFsharp-MigraDoc’ can be used on any platform including Windows and Linux. The Target Framework is ’net6.0’.
7880
The packages ’PDFsharp-MigraDoc-GDI’ and ’PDFsharp-MigraDoc-WPF’ can be used under Windows only. The Target Framework is ’net6.0-windows’.
7981
See the project docs site for further information:

src/foundation/nuget/src/MigraDoc.NuGet-gdi/ReleaseNotes.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
This is a preview version of PDFsharp and MigraDoc Foundation 6.0.0 using .NET 6.
1+
This is a version of PDFsharp and MigraDoc Foundation using .NET 6.
22
The package ’PDFsharp-MigraDoc’ can be used on any platform including Windows and Linux. The Target Framework is ’net6.0’.
33
The packages ’PDFsharp-MigraDoc-GDI’ and ’PDFsharp-MigraDoc-WPF’ can be used under Windows only. The Target Framework is ’net6.0-windows’.
44
See the project docs site for further information:

src/foundation/nuget/src/MigraDoc.NuGet-wpf/ReleaseNotes.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
This is a preview version of PDFsharp and MigraDoc Foundation 6.0.0 using .NET 6.
1+
This is a version of PDFsharp and MigraDoc Foundation using .NET 6.
22
The package ’PDFsharp-MigraDoc’ can be used on any platform including Windows and Linux. The Target Framework is ’net6.0’.
33
The packages ’PDFsharp-MigraDoc-GDI’ and ’PDFsharp-MigraDoc-WPF’ can be used under Windows only. The Target Framework is ’net6.0-windows’.
44
See the project docs site for further information:

src/foundation/nuget/src/MigraDoc.NuGet/ReleaseNotes.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
This is a preview version of PDFsharp and MigraDoc Foundation 6.0.0 using .NET 6.
1+
This is a version of PDFsharp and MigraDoc Foundation using .NET 6.
22
The package ’PDFsharp-MigraDoc’ can be used on any platform including Windows and Linux. The Target Framework is ’net6.0’.
33
The packages ’PDFsharp-MigraDoc-GDI’ and ’PDFsharp-MigraDoc-WPF’ can be used under Windows only. The Target Framework is ’net6.0-windows’.
44
See the project docs site for further information:

src/foundation/nuget/src/PDFsharp.NuGet-gdi/ReleaseNotes.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
This is a preview version of PDFsharp 6.0.0 using .NET 6.
1+
This is a version of PDFsharp using .NET 6.
22
The package ’PdfSharp’ can be used on any platform including Windows and Linux. The Target Framework is ’net6.0’.
33
The packages ’PDFsharp-gdi’ and ’PDFsharp-wpf’ can be used under Windows only. The Target Framework is ’net6.0-windows’.
44
We also publish packages that contain PDFsharp plus MigraDoc.

src/foundation/nuget/src/PDFsharp.NuGet-wpf/ReleaseNotes.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
This is a preview version of PDFsharp 6.0.0 using .NET 6.
1+
This is a version of PDFsharp using .NET 6.
22
The package ’PdfSharp’ can be used on any platform including Windows and Linux. The Target Framework is ’net6.0’.
33
The packages ’PDFsharp-gdi’ and ’PDFsharp-wpf’ can be used under Windows only. The Target Framework is ’net6.0-windows’.
44
We also publish packages that contain PDFsharp plus MigraDoc.

src/foundation/nuget/src/PDFsharp.NuGet/ReleaseNotes.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
This is a preview version of PDFsharp 6.0.0 using .NET 6.
1+
This is a version of PDFsharp using .NET 6.
22
The package ’PdfSharp’ can be used on any platform including Windows and Linux. The Target Framework is ’net6.0’.
33
The packages ’PDFsharp-gdi’ and ’PDFsharp-wpf’ can be used under Windows only. The Target Framework is ’net6.0-windows’.
44
We also publish packages that contain PDFsharp plus MigraDoc.

src/foundation/src/MigraDoc/src/MigraDoc.DocumentObjectModel/DocumentObjectModel/Color.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -357,9 +357,7 @@ public static Color Parse(string color)
357357
var r = color[1..2];
358358
var g = color[2..3];
359359
var b = color[3..4];
360-
number = "ff" + color.Substring(1, 1) + color.Substring(1, 1) +
361-
color.Substring(2, 1) + color.Substring(2, 1) +
362-
color.Substring(3, 1) + color.Substring(3, 1);
360+
number = "ff" + r + r + g + g + b + b;
363361
break;
364362
default:
365363
throw new ArgumentException(DomSR.InvalidColorString(color), nameof(color));
@@ -434,7 +432,7 @@ public static Color Parse(string color)
434432
/// </summary>
435433
public Color GetMixedTransparencyColor()
436434
{
437-
// Think of Empty a the neutral element.
435+
// Think of Empty as the neutral element.
438436
if (IsEmpty)
439437
return this;
440438

src/foundation/src/PDFsharp/src/PdfSharp/Drawing.BarCodes/CodeOmr.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,7 @@ protected internal override void Render(XGraphics gfx, XBrush brush, XFont? font
4141
XPoint pt = position - CodeBase.CalcDistance(AnchorType.TopLeft, Anchor, Size);
4242
uint value;
4343
UInt32.TryParse(Text, out value);
44-
#if true
45-
// HACK: Project Wallenwein: set LK
46-
value |= 1;
47-
_synchronizeCode = true;
48-
#endif
44+
4945
if (_synchronizeCode)
5046
{
5147
var rect = new XRect(pt.X, pt.Y, _makerThickness, Size.Height);

src/foundation/src/PDFsharp/src/PdfSharp/Pdf/PdfDocument.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ public void Save(Stream stream, bool closeStream)
298298
/// <summary>
299299
/// Saves the document to the specified stream.
300300
/// The stream is not closed by this function.
301-
/// (Older versions of PDFsharp closes the stream. That was not very useful.)
301+
/// (Older versions of PDFsharp close the stream. That was not very useful.)
302302
/// </summary>
303303
public void Save(Stream stream)
304304
=> Save(stream, false);
@@ -496,19 +496,19 @@ public int Version
496496

497497
/// <summary>
498498
/// Adjusts the version if the current version is lower than the required version.
499+
/// Version is not adjusted for inconsistent files in ReadOnly mode.
499500
/// </summary>
500501
/// <param name="requiredVersion">The minimum version number to set version to.</param>
501502
/// <returns>True, if Version was modified.</returns>
502503
public bool SetRequiredVersion(int requiredVersion)
503504
{
504-
if (requiredVersion > Version)
505+
if (requiredVersion > Version && CanModify)
505506
{
506507
Version = requiredVersion;
507508
return true;
508509
}
509510

510511
return false;
511-
512512
}
513513

514514
/// <summary>

0 commit comments

Comments
 (0)