Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
PDFsharp-Team committed Nov 7, 2023
1 parent a8fe909 commit b748631
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 23 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -15,6 +15,8 @@ For more information see [docs.pdfsharp.net](https://docs.pdfsharp.net/)

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

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.
Expand Down
6 changes: 4 additions & 2 deletions docs/BoilerplateText.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/foundation/nuget/src/MigraDoc.NuGet/ReleaseNotes.txt
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/foundation/nuget/src/PDFsharp.NuGet/ReleaseNotes.txt
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -434,7 +432,7 @@ public static Color Parse(string color)
/// </summary>
public Color GetMixedTransparencyColor()
{
// Think of Empty a the neutral element.
// Think of Empty as the neutral element.
if (IsEmpty)
return this;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions src/foundation/src/PDFsharp/src/PdfSharp/Pdf/PdfDocument.cs
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ public void Save(Stream stream, bool closeStream)
/// <summary>
/// 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.)
/// </summary>
public void Save(Stream stream)
=> Save(stream, false);
Expand Down Expand Up @@ -496,19 +496,19 @@ public int Version

/// <summary>
/// Adjusts the version if the current version is lower than the required version.
/// Version is not adjusted for inconsistent files in ReadOnly mode.
/// </summary>
/// <param name="requiredVersion">The minimum version number to set version to.</param>
/// <returns>True, if Version was modified.</returns>
public bool SetRequiredVersion(int requiredVersion)
{
if (requiredVersion > Version)
if (requiredVersion > Version && CanModify)
{
Version = requiredVersion;
return true;
}

return false;

}

/// <summary>
Expand Down

0 comments on commit b748631

Please sign in to comment.