Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
PDFsharp-Team committed Apr 26, 2023
1 parent c32450e commit d751497
Show file tree
Hide file tree
Showing 277 changed files with 3,948 additions and 5,499 deletions.
21 changes: 21 additions & 0 deletions PdfSharp.sln
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Shared.TestApp", "src\found
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Shared.Tests", "src\foundation\src\shared\tests\Shared.Tests\Shared.Tests.csproj", "{9AFE8A79-333C-414C-A12B-A2201EC211E8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PdfSharp.Features.Runner", "src\foundation\src\PDFsharp\features\PdfSharp.Features.Runner\PdfSharp.Features.Runner.csproj", "{BA04FBE0-6B97-4D21-9561-91F12906A5F9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PDFsharp.Features.Runner-gdi", "src\foundation\src\PDFsharp\features\PDFsharp.Features.Runner-gdi\PDFsharp.Features.Runner-gdi.csproj", "{380C02B5-94DC-491C-9458-6F5287698C77}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PDFsharp.Features.Runner-wpf", "src\foundation\src\PDFsharp\features\PDFsharp.Features.Runner-wpf\PDFsharp.Features.Runner-wpf.csproj", "{D0CD20C3-C06B-436E-8C88-E5A608C74AB2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -411,6 +417,18 @@ Global
{9AFE8A79-333C-414C-A12B-A2201EC211E8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9AFE8A79-333C-414C-A12B-A2201EC211E8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9AFE8A79-333C-414C-A12B-A2201EC211E8}.Release|Any CPU.Build.0 = Release|Any CPU
{BA04FBE0-6B97-4D21-9561-91F12906A5F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BA04FBE0-6B97-4D21-9561-91F12906A5F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BA04FBE0-6B97-4D21-9561-91F12906A5F9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BA04FBE0-6B97-4D21-9561-91F12906A5F9}.Release|Any CPU.Build.0 = Release|Any CPU
{380C02B5-94DC-491C-9458-6F5287698C77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{380C02B5-94DC-491C-9458-6F5287698C77}.Debug|Any CPU.Build.0 = Debug|Any CPU
{380C02B5-94DC-491C-9458-6F5287698C77}.Release|Any CPU.ActiveCfg = Release|Any CPU
{380C02B5-94DC-491C-9458-6F5287698C77}.Release|Any CPU.Build.0 = Release|Any CPU
{D0CD20C3-C06B-436E-8C88-E5A608C74AB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D0CD20C3-C06B-436E-8C88-E5A608C74AB2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D0CD20C3-C06B-436E-8C88-E5A608C74AB2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D0CD20C3-C06B-436E-8C88-E5A608C74AB2}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -494,6 +512,9 @@ Global
{9A382224-6874-4ED3-8DF6-1DD3466A02CE} = {A484FFA0-1C54-4C5C-B46D-6AB5C05AC5AB}
{823A4ABD-43F0-4BE9-9DD6-722A84497432} = {9A382224-6874-4ED3-8DF6-1DD3466A02CE}
{9AFE8A79-333C-414C-A12B-A2201EC211E8} = {A1AE894D-9061-44F0-8268-328AC41F403A}
{BA04FBE0-6B97-4D21-9561-91F12906A5F9} = {F6F7E411-5CD0-4507-BF59-70004EDD09DA}
{380C02B5-94DC-491C-9458-6F5287698C77} = {F6F7E411-5CD0-4507-BF59-70004EDD09DA}
{D0CD20C3-C06B-436E-8C88-E5A608C74AB2} = {F6F7E411-5CD0-4507-BF59-70004EDD09DA}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D5FF5562-3C79-434B-B951-B84542D01625}
Expand Down
3 changes: 3 additions & 0 deletions PdfSharp.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,8 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=Semilight/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=stringprep/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=subpath/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=tabstop/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=tabstops/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=tabstop_0027s/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=versioning/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=xgfx/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
6 changes: 3 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-1**
Published **2023-04-03**
Version **6.0.0-preview-2**
Published **2023-04-25**

This is the first preview of the **PDFsharp** project, the main project of PDFsharp & MigraDoc 6.0 with updates for C# 10 and .NET 6.0.
This is the second preview 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 Down
4 changes: 2 additions & 2 deletions dev/build-local-nuget-packages-release.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ param (
Push-Location $PSScriptRoot

try {
Write-Host "Delete Bin and Obj " $deleteBinAndObj
Write-Host "Delete bin and obj " $deleteBinAndObj
if ($deleteBinAndObj) {
Write-Host "Deleting BIN and OBJ"
.\del-bin-and-obj.ps1
Write-Host "Done deleting BIN and OBJ"
Write-Host "Done deleting bin and obj"
}

Push-Location ..
Expand Down
4 changes: 2 additions & 2 deletions docs/BoilerplateText.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ MigraDoc is a .NET library that allows developers to create documents such as PD

PDFsharp:
This is a preview version of PDFsharp 6.0.0 using .NET 6.
The packages ’PdfSharp’ can be used on any platform including Windows and Linux.
The package ’PdfSharp’ can be used on any platform including Windows and Linux.
The packages ’PDFsharp-gdi’ and ’PDFsharp-wpf’ can be used under Windows only.
We also publish packages that contain PDFsharp plus MigraDoc.
See the project docs site for further information:
Expand All @@ -74,7 +74,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.
The packages ’PDFsharp-MigraDoc’ can be used on any platform including Windows and Linux.
The package ’PDFsharp-MigraDoc’ can be used on any platform including Windows and Linux.
The packages ’PDFsharp-MigraDoc-GDI’ and ’PDFsharp-MigraDoc-WPF’ can be used under Windows only.
See the project docs site for further information:
https://docs.pdfsharp.net/history/readme-v6.0.html
3 changes: 1 addition & 2 deletions gitversion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ branches:
release: # Release and preview versions.
# 22.40.0 / 22.40.0-rc-1
# 5.0.0-preview-2
#regex: ^(release[/-]|master)
regex: ^release?[/-]
regex: ^(release[/-]|master)
# ^(user|feature|fix)[/-]
# Must not have mode set to be mainline
increment: None
Expand Down
2 changes: 2 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<PropertyGroup>
<IsPackable>false</IsPackable>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<!-- Found no other way to resolve the following warning than disable it -->
<NoWarn>NU1507</NoWarn>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@

<!--<PackageVersion Include="Microsoft.AspNetCore.SignalR.Common" Version="$(AspNetCore_SignalR_PackageVersion)" />-->
<!--<PackageVersion Include="Microsoft.AspNetCore.SignalR.Client" Version="$(AspNetCore_SignalR_PackageVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.SignalR.Client.Core" Version="$(AspNetCore_SignalR_PackageVersion)" />-->
<PackageVersion Include="Microsoft.AspNetCore.SignalR.Client.Core" Version="$(AspNetCore_SignalR_PackageVersion)" />-->

<!--<PackageVersion Include="Microsoft.AspNetCore.SignalR.Core" Version="1.1.0" />-->

Expand Down
4 changes: 2 additions & 2 deletions src/foundation/nuget/src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
<DebugBuildMessage>***** THIS IS A DEBUG BUILD - DO NOT PUBLISH *****%0d</DebugBuildMessage>

<!--<NuGetProjectUrl>https://docs.pdfsharp.net</NuGetProjectUrl>-->
<NuGetProjectUrl>http://pdfsharp.net</NuGetProjectUrl>
<NuGetProjectUrl>https://docs.pdfsharp.net</NuGetProjectUrl>
<NuGetTags_PdfSharp>PDFsharp PDF creation</NuGetTags_PdfSharp>
<NuGetTags_MigraDoc>MigraDoc PdfSharp Pdf Document Generation</NuGetTags_MigraDoc>
<NuGetTags_MigraDoc>MigraDoc PDFsharp PDF Document Generation</NuGetTags_MigraDoc>
</PropertyGroup>

<Target Name="SetNuspecProperties" BeforeTargets="GenerateNuspec">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ PDFsharp is the Open Source library for creating and modifying PDF documents usi

This package relies on Windows Forms (GDI+) and can be used under Windows only.

See https://docs.pdfsharp.net for details.
See https://docs.pdfsharp.net for details.
1 change: 0 additions & 1 deletion src/foundation/nuget/src/PDFsharp.NuGet-gdi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ PDFsharp is the Open Source library for creating and modifying PDF documents usi
This package relies on Windows Forms (GDI+) and can be used under Windows only.

See [docs.pdfsharp.net](https://docs.pdfsharp.net) for details.

Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ PDFsharp is the Open Source library for creating and modifying PDF documents usi

This package relies on Windows Presentation Foundation (WPF) and can be used under Windows only.

See https://docs.pdfsharp.net for details.
See https://docs.pdfsharp.net for details.
1 change: 0 additions & 1 deletion src/foundation/nuget/src/PDFsharp.NuGet-wpf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ PDFsharp is the Open Source library for creating and modifying PDF documents usi
This package relies on Windows Presentation Foundation (WPF) and can be used under Windows only.

See [docs.pdfsharp.net](https://docs.pdfsharp.net) for details.

2 changes: 1 addition & 1 deletion src/foundation/nuget/src/PDFsharp.NuGet/Description.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ PDFsharp is the Open Source library for creating and modifying PDF documents usi

This package does not depend on Windows and can be used on any .NET compatible platform including Linux and macOS.

See https://docs.pdfsharp.net for details.
See https://docs.pdfsharp.net for details.
1 change: 0 additions & 1 deletion src/foundation/nuget/src/PDFsharp.NuGet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ PDFsharp is the Open Source library for creating and modifying PDF documents usi
This package does not depend on Windows and can be used on any .NET compatible platform including Linux and macOS.

See [docs.pdfsharp.net](https://docs.pdfsharp.net) for details.

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,5 +1,5 @@
This is a preview version of PDFsharp 6.0.0 using .NET 6.
The packages ’PdfSharp’ can be used on any platform including Windows and Linux.
The package ’PdfSharp’ can be used on any platform including Windows and Linux.
The packages ’PDFsharp-gdi’ and ’PDFsharp-wpf’ can be used under Windows only.
We also publish packages that contain PDFsharp plus MigraDoc.
See the project docs site for further information:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,39 @@ namespace MigraDoc
/// </summary>
public static class Capabilities
{
// Duplicated from PDFsharp. TODO Unify.
/// <summary>
/// Defines the action to be taken if a requested feature is not available
/// in the current build.
/// </summary>
public enum FeatureNotAvailableAction // RENAME ProblemBehavior
{
/// <summary>
/// Do nothing.
/// </summary>
DoNothing = 0,

/// <summary>
/// The log warning.
/// </summary>
LogInformation = 1,

/// <summary>
/// The log warning.
/// </summary>
LogWarning = 2,

/// <summary>
/// The log error.
/// </summary>
LogError = 3,

/// <summary>
/// The fail with exception.
/// </summary>
FailWithException = 4
}

//static Capabilities()
//{
// //var x = IsAvailable.GlyphsToPathFrom(new XFontFamily("test"));
Expand Down Expand Up @@ -49,6 +82,22 @@ public static class BackwardCompatibility


// TODO Space before on new page

/// <summary>
/// In RTF a single decimal tabstop in a table is a special case.
/// In contrast to other tabstops, multiple tabstops in tables and decimal tabstops outside of tables,
/// the content is here aligned to the tabstop without the need of a tab.
/// Adding a tab in RTF would move the content to the next (not existing) tabstop and would perhaps
/// result in an unwanted line break.
/// Since Version 6.0.0 PDFsharp provides a consistent behavior through PDF and RTF generation
/// and all tabstop usages. With that change a tab is always needed to reach a tabstop.
/// To achieve this, the RTF TabStopsRenderer will render an additional left aligned tabstop
/// at position 0, if TabStops is inside a cell and contains only one tabstop, which is set to
/// decimal alignment and a position greater than 0.
/// Set this property to true to reactivate the old behavior without any corrections for
/// this special case by PDFsharp.
/// </summary>
public static bool DoNotUnifyTabStopHandling { get; set; } = false;
}

//public static class Action
Expand All @@ -59,5 +108,20 @@ public static class BackwardCompatibility
// /// </summary>
// public static FeatureNotAvailableAction GlyphsToPath { get; set; } = FeatureNotAvailableAction.DoNothing;
//}


/// <summary>
/// Compatibility settings for MigraDoc.
/// </summary>
public static class Compatibility
{
/// <summary>
/// Gets or sets a flag that specifies if the renderer should silently ignore charts if they are not supported.
/// Otherwise an exception will be thrown.
/// </summary>
public static FeatureNotAvailableAction ChartsCannotBeRendered { get; set; } = FeatureNotAvailableAction.DoNothing;

// TODO Barcodes etc.
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using Microsoft.Extensions.Logging;

#pragma warning disable 1591
#pragma warning disable 1591 // Because this is preview code.

namespace MigraDoc.DocumentObjectModel.Internals
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,52 @@
// MigraDoc - Creating Documents on the Fly
// See the LICENSE file in the solution root for more information.

#pragma warning disable 1591

namespace MigraDoc.DocumentObjectModel.Shapes.Charts
{
/// <summary>
/// Symbols of a data point in a line chart.
/// </summary>
public enum MarkerStyle
{
/// <summary>
/// No marker.
/// </summary>
None,
/// <summary>
/// Circle.
/// </summary>
Circle,
/// <summary>
/// Dash.
/// </summary>
Dash,
/// <summary>
/// Diamond.
/// </summary>
Diamond,
/// <summary>
/// Dot.
/// </summary>
Dot,
/// <summary>
/// Plus.
/// </summary>
Plus,
/// <summary>
/// Square.
/// </summary>
Square,
/// <summary>
/// Star.
/// </summary>
Star,
/// <summary>
/// Triangle.
/// </summary>
Triangle,
/// <summary>
/// X-shaped marker.
/// </summary>
X
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// MigraDoc - Creating Documents on the Fly
// See the LICENSE file in the solution root for more information.

#pragma warning disable 1591

namespace MigraDoc.DocumentObjectModel.Tables
{
/// <summary>
Expand All @@ -11,16 +9,49 @@ namespace MigraDoc.DocumentObjectModel.Tables
[Flags]
public enum Edge
{
/// <summary>
/// Border at top edge.
/// </summary>
Top = 0x0001,
/// <summary>
/// Border at left edge.
/// </summary>
Left = 0x0002,
/// <summary>
/// Border at bottom edge.
/// </summary>
Bottom = 0x0004,
/// <summary>
/// Border at right edge.
/// </summary>
Right = 0x0008,
/// <summary>
/// Horizontal border.
/// </summary>
Horizontal = 0x0010,
/// <summary>
/// Vertical border.
/// </summary>
Vertical = 0x0020,
/// <summary>
/// Diagonal-down border.
/// </summary>
DiagonalDown = 0x0040,
/// <summary>
/// Diagonal-up border.
/// </summary>
DiagonalUp = 0x0080,
/// <summary>
/// Box means Borders at top, left, right, and bottom edge.
/// </summary>
Box = Top | Left | Bottom | Right,
/// <summary>
/// Interior means horizontal and vertical borders.
/// </summary>
Interior = Horizontal | Vertical,
/// <summary>
/// Interior means diagonal-down and diagonal-up borders.
/// </summary>
Cross = DiagonalDown | DiagonalUp,
}
}
Loading

0 comments on commit d751497

Please sign in to comment.