Skip to content

Commit d751497

Browse files
committed
1 parent c32450e commit d751497

File tree

277 files changed

+3948
-5499
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

277 files changed

+3948
-5499
lines changed

PdfSharp.sln

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Shared.TestApp", "src\found
201201
EndProject
202202
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Shared.Tests", "src\foundation\src\shared\tests\Shared.Tests\Shared.Tests.csproj", "{9AFE8A79-333C-414C-A12B-A2201EC211E8}"
203203
EndProject
204+
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}"
205+
EndProject
206+
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}"
207+
EndProject
208+
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}"
209+
EndProject
204210
Global
205211
GlobalSection(SolutionConfigurationPlatforms) = preSolution
206212
Debug|Any CPU = Debug|Any CPU
@@ -411,6 +417,18 @@ Global
411417
{9AFE8A79-333C-414C-A12B-A2201EC211E8}.Debug|Any CPU.Build.0 = Debug|Any CPU
412418
{9AFE8A79-333C-414C-A12B-A2201EC211E8}.Release|Any CPU.ActiveCfg = Release|Any CPU
413419
{9AFE8A79-333C-414C-A12B-A2201EC211E8}.Release|Any CPU.Build.0 = Release|Any CPU
420+
{BA04FBE0-6B97-4D21-9561-91F12906A5F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
421+
{BA04FBE0-6B97-4D21-9561-91F12906A5F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
422+
{BA04FBE0-6B97-4D21-9561-91F12906A5F9}.Release|Any CPU.ActiveCfg = Release|Any CPU
423+
{BA04FBE0-6B97-4D21-9561-91F12906A5F9}.Release|Any CPU.Build.0 = Release|Any CPU
424+
{380C02B5-94DC-491C-9458-6F5287698C77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
425+
{380C02B5-94DC-491C-9458-6F5287698C77}.Debug|Any CPU.Build.0 = Debug|Any CPU
426+
{380C02B5-94DC-491C-9458-6F5287698C77}.Release|Any CPU.ActiveCfg = Release|Any CPU
427+
{380C02B5-94DC-491C-9458-6F5287698C77}.Release|Any CPU.Build.0 = Release|Any CPU
428+
{D0CD20C3-C06B-436E-8C88-E5A608C74AB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
429+
{D0CD20C3-C06B-436E-8C88-E5A608C74AB2}.Debug|Any CPU.Build.0 = Debug|Any CPU
430+
{D0CD20C3-C06B-436E-8C88-E5A608C74AB2}.Release|Any CPU.ActiveCfg = Release|Any CPU
431+
{D0CD20C3-C06B-436E-8C88-E5A608C74AB2}.Release|Any CPU.Build.0 = Release|Any CPU
414432
EndGlobalSection
415433
GlobalSection(SolutionProperties) = preSolution
416434
HideSolutionNode = FALSE
@@ -494,6 +512,9 @@ Global
494512
{9A382224-6874-4ED3-8DF6-1DD3466A02CE} = {A484FFA0-1C54-4C5C-B46D-6AB5C05AC5AB}
495513
{823A4ABD-43F0-4BE9-9DD6-722A84497432} = {9A382224-6874-4ED3-8DF6-1DD3466A02CE}
496514
{9AFE8A79-333C-414C-A12B-A2201EC211E8} = {A1AE894D-9061-44F0-8268-328AC41F403A}
515+
{BA04FBE0-6B97-4D21-9561-91F12906A5F9} = {F6F7E411-5CD0-4507-BF59-70004EDD09DA}
516+
{380C02B5-94DC-491C-9458-6F5287698C77} = {F6F7E411-5CD0-4507-BF59-70004EDD09DA}
517+
{D0CD20C3-C06B-436E-8C88-E5A608C74AB2} = {F6F7E411-5CD0-4507-BF59-70004EDD09DA}
497518
EndGlobalSection
498519
GlobalSection(ExtensibilityGlobals) = postSolution
499520
SolutionGuid = {D5FF5562-3C79-434B-B951-B84542D01625}

PdfSharp.sln.DotSettings

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,8 @@
4141
<s:Boolean x:Key="/Default/UserDictionary/Words/=Semilight/@EntryIndexedValue">True</s:Boolean>
4242
<s:Boolean x:Key="/Default/UserDictionary/Words/=stringprep/@EntryIndexedValue">True</s:Boolean>
4343
<s:Boolean x:Key="/Default/UserDictionary/Words/=subpath/@EntryIndexedValue">True</s:Boolean>
44+
<s:Boolean x:Key="/Default/UserDictionary/Words/=tabstop/@EntryIndexedValue">True</s:Boolean>
45+
<s:Boolean x:Key="/Default/UserDictionary/Words/=tabstops/@EntryIndexedValue">True</s:Boolean>
46+
<s:Boolean x:Key="/Default/UserDictionary/Words/=tabstop_0027s/@EntryIndexedValue">True</s:Boolean>
4447
<s:Boolean x:Key="/Default/UserDictionary/Words/=versioning/@EntryIndexedValue">True</s:Boolean>
4548
<s:Boolean x:Key="/Default/UserDictionary/Words/=xgfx/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

README.md

Lines changed: 3 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-1**
4-
Published **2023-04-03**
3+
Version **6.0.0-preview-2**
4+
Published **2023-04-25**
55

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

dev/build-local-nuget-packages-release.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ param (
1010
Push-Location $PSScriptRoot
1111

1212
try {
13-
Write-Host "Delete Bin and Obj " $deleteBinAndObj
13+
Write-Host "Delete bin and obj " $deleteBinAndObj
1414
if ($deleteBinAndObj) {
1515
Write-Host "Deleting BIN and OBJ"
1616
.\del-bin-and-obj.ps1
17-
Write-Host "Done deleting BIN and OBJ"
17+
Write-Host "Done deleting bin and obj"
1818
}
1919

2020
Push-Location ..

docs/BoilerplateText.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ MigraDoc is a .NET library that allows developers to create documents such as PD
6565

6666
PDFsharp:
6767
This is a preview version of PDFsharp 6.0.0 using .NET 6.
68-
The packages ’PdfSharp’ can be used on any platform including Windows and Linux.
68+
The package ’PdfSharp’ can be used on any platform including Windows and Linux.
6969
The packages ’PDFsharp-gdi’ and ’PDFsharp-wpf’ can be used under Windows only.
7070
We also publish packages that contain PDFsharp plus MigraDoc.
7171
See the project docs site for further information:
@@ -74,7 +74,7 @@ https://docs.pdfsharp.net/history/readme-v6.0.html
7474

7575
PDFsharp & MigraDoc:
7676
This is a preview version of PDFsharp and MigraDoc Foundation 6.0.0 using .NET 6.
77-
The packages ’PDFsharp-MigraDoc’ can be used on any platform including Windows and Linux.
77+
The package ’PDFsharp-MigraDoc’ can be used on any platform including Windows and Linux.
7878
The packages ’PDFsharp-MigraDoc-GDI’ and ’PDFsharp-MigraDoc-WPF’ can be used under Windows only.
7979
See the project docs site for further information:
8080
https://docs.pdfsharp.net/history/readme-v6.0.html

gitversion.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ branches:
1515
release: # Release and preview versions.
1616
# 22.40.0 / 22.40.0-rc-1
1717
# 5.0.0-preview-2
18-
#regex: ^(release[/-]|master)
19-
regex: ^release?[/-]
18+
regex: ^(release[/-]|master)
2019
# ^(user|feature|fix)[/-]
2120
# Must not have mode set to be mainline
2221
increment: None

src/Directory.Build.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<PropertyGroup>
33
<IsPackable>false</IsPackable>
44
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
<Nullable>enable</Nullable>
57
<!-- Found no other way to resolve the following warning than disable it -->
68
<NoWarn>NU1507</NoWarn>
79
</PropertyGroup>

src/Directory.Packages.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104

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

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

src/foundation/nuget/src/Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
<DebugBuildMessage>***** THIS IS A DEBUG BUILD - DO NOT PUBLISH *****%0d</DebugBuildMessage>
1414

1515
<!--<NuGetProjectUrl>https://docs.pdfsharp.net</NuGetProjectUrl>-->
16-
<NuGetProjectUrl>http://pdfsharp.net</NuGetProjectUrl>
16+
<NuGetProjectUrl>https://docs.pdfsharp.net</NuGetProjectUrl>
1717
<NuGetTags_PdfSharp>PDFsharp PDF creation</NuGetTags_PdfSharp>
18-
<NuGetTags_MigraDoc>MigraDoc PdfSharp Pdf Document Generation</NuGetTags_MigraDoc>
18+
<NuGetTags_MigraDoc>MigraDoc PDFsharp PDF Document Generation</NuGetTags_MigraDoc>
1919
</PropertyGroup>
2020

2121
<Target Name="SetNuspecProperties" BeforeTargets="GenerateNuspec">

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ PDFsharp is the Open Source library for creating and modifying PDF documents usi
22

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

5-
See https://docs.pdfsharp.net for details.
5+
See https://docs.pdfsharp.net for details.

src/foundation/nuget/src/PDFsharp.NuGet-gdi/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@ PDFsharp is the Open Source library for creating and modifying PDF documents usi
55
This package relies on Windows Forms (GDI+) and can be used under Windows only.
66

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ PDFsharp is the Open Source library for creating and modifying PDF documents usi
22

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

5-
See https://docs.pdfsharp.net for details.
5+
See https://docs.pdfsharp.net for details.

src/foundation/nuget/src/PDFsharp.NuGet-wpf/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@ PDFsharp is the Open Source library for creating and modifying PDF documents usi
55
This package relies on Windows Presentation Foundation (WPF) and can be used under Windows only.
66

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ PDFsharp is the Open Source library for creating and modifying PDF documents usi
22

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

5-
See https://docs.pdfsharp.net for details.
5+
See https://docs.pdfsharp.net for details.

src/foundation/nuget/src/PDFsharp.NuGet/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@ PDFsharp is the Open Source library for creating and modifying PDF documents usi
55
This package does not depend on Windows and can be used on any .NET compatible platform including Linux and macOS.
66

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
This is a preview version of PDFsharp 6.0.0 using .NET 6.
2-
The packages ’PdfSharp’ can be used on any platform including Windows and Linux.
2+
The package ’PdfSharp’ can be used on any platform including Windows and Linux.
33
The packages ’PDFsharp-gdi’ and ’PDFsharp-wpf’ can be used under Windows only.
44
We also publish packages that contain PDFsharp plus MigraDoc.
55
See the project docs site for further information:

src/foundation/src/MigraDoc/features/MigraDoc.Features/MigraDoc.Features.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
55
<TargetFramework>net6.0</TargetFramework>
6-
<ImplicitUsings>enable</ImplicitUsings>
7-
<Nullable>enable</Nullable>
86
</PropertyGroup>
97

108
</Project>

src/foundation/src/MigraDoc/src/MigraDoc.DocumentObjectModel/Capabilities.cs

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,39 @@ namespace MigraDoc
1010
/// </summary>
1111
public static class Capabilities
1212
{
13+
// Duplicated from PDFsharp. TODO Unify.
14+
/// <summary>
15+
/// Defines the action to be taken if a requested feature is not available
16+
/// in the current build.
17+
/// </summary>
18+
public enum FeatureNotAvailableAction // RENAME ProblemBehavior
19+
{
20+
/// <summary>
21+
/// Do nothing.
22+
/// </summary>
23+
DoNothing = 0,
24+
25+
/// <summary>
26+
/// The log warning.
27+
/// </summary>
28+
LogInformation = 1,
29+
30+
/// <summary>
31+
/// The log warning.
32+
/// </summary>
33+
LogWarning = 2,
34+
35+
/// <summary>
36+
/// The log error.
37+
/// </summary>
38+
LogError = 3,
39+
40+
/// <summary>
41+
/// The fail with exception.
42+
/// </summary>
43+
FailWithException = 4
44+
}
45+
1346
//static Capabilities()
1447
//{
1548
// //var x = IsAvailable.GlyphsToPathFrom(new XFontFamily("test"));
@@ -49,6 +82,22 @@ public static class BackwardCompatibility
4982

5083

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

54103
//public static class Action
@@ -59,5 +108,20 @@ public static class BackwardCompatibility
59108
// /// </summary>
60109
// public static FeatureNotAvailableAction GlyphsToPath { get; set; } = FeatureNotAvailableAction.DoNothing;
61110
//}
111+
112+
113+
/// <summary>
114+
/// Compatibility settings for MigraDoc.
115+
/// </summary>
116+
public static class Compatibility
117+
{
118+
/// <summary>
119+
/// Gets or sets a flag that specifies if the renderer should silently ignore charts if they are not supported.
120+
/// Otherwise an exception will be thrown.
121+
/// </summary>
122+
public static FeatureNotAvailableAction ChartsCannotBeRendered { get; set; } = FeatureNotAvailableAction.DoNothing;
123+
124+
// TODO Barcodes etc.
125+
}
62126
}
63127
}

src/foundation/src/MigraDoc/src/MigraDoc.DocumentObjectModel/DocumentObjectModel.Internals/Logging.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
using Microsoft.Extensions.Logging;
55

6-
#pragma warning disable 1591
6+
#pragma warning disable 1591 // Because this is preview code.
77

88
namespace MigraDoc.DocumentObjectModel.Internals
99
{
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,52 @@
11
// MigraDoc - Creating Documents on the Fly
22
// See the LICENSE file in the solution root for more information.
33

4-
#pragma warning disable 1591
5-
64
namespace MigraDoc.DocumentObjectModel.Shapes.Charts
75
{
86
/// <summary>
97
/// Symbols of a data point in a line chart.
108
/// </summary>
119
public enum MarkerStyle
1210
{
11+
/// <summary>
12+
/// No marker.
13+
/// </summary>
1314
None,
15+
/// <summary>
16+
/// Circle.
17+
/// </summary>
1418
Circle,
19+
/// <summary>
20+
/// Dash.
21+
/// </summary>
1522
Dash,
23+
/// <summary>
24+
/// Diamond.
25+
/// </summary>
1626
Diamond,
27+
/// <summary>
28+
/// Dot.
29+
/// </summary>
1730
Dot,
31+
/// <summary>
32+
/// Plus.
33+
/// </summary>
1834
Plus,
35+
/// <summary>
36+
/// Square.
37+
/// </summary>
1938
Square,
39+
/// <summary>
40+
/// Star.
41+
/// </summary>
2042
Star,
43+
/// <summary>
44+
/// Triangle.
45+
/// </summary>
2146
Triangle,
47+
/// <summary>
48+
/// X-shaped marker.
49+
/// </summary>
2250
X
2351
}
2452
}
Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// MigraDoc - Creating Documents on the Fly
22
// See the LICENSE file in the solution root for more information.
33

4-
#pragma warning disable 1591
5-
64
namespace MigraDoc.DocumentObjectModel.Tables
75
{
86
/// <summary>
@@ -11,16 +9,49 @@ namespace MigraDoc.DocumentObjectModel.Tables
119
[Flags]
1210
public enum Edge
1311
{
12+
/// <summary>
13+
/// Border at top edge.
14+
/// </summary>
1415
Top = 0x0001,
16+
/// <summary>
17+
/// Border at left edge.
18+
/// </summary>
1519
Left = 0x0002,
20+
/// <summary>
21+
/// Border at bottom edge.
22+
/// </summary>
1623
Bottom = 0x0004,
24+
/// <summary>
25+
/// Border at right edge.
26+
/// </summary>
1727
Right = 0x0008,
28+
/// <summary>
29+
/// Horizontal border.
30+
/// </summary>
1831
Horizontal = 0x0010,
32+
/// <summary>
33+
/// Vertical border.
34+
/// </summary>
1935
Vertical = 0x0020,
36+
/// <summary>
37+
/// Diagonal-down border.
38+
/// </summary>
2039
DiagonalDown = 0x0040,
40+
/// <summary>
41+
/// Diagonal-up border.
42+
/// </summary>
2143
DiagonalUp = 0x0080,
44+
/// <summary>
45+
/// Box means Borders at top, left, right, and bottom edge.
46+
/// </summary>
2247
Box = Top | Left | Bottom | Right,
48+
/// <summary>
49+
/// Interior means horizontal and vertical borders.
50+
/// </summary>
2351
Interior = Horizontal | Vertical,
52+
/// <summary>
53+
/// Interior means diagonal-down and diagonal-up borders.
54+
/// </summary>
2455
Cross = DiagonalDown | DiagonalUp,
2556
}
2657
}

0 commit comments

Comments
 (0)