diff --git a/.gitmodules b/.gitmodules index e266600..c03f182 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ [submodule "src/ACadSharp"] path = src/ACadSharp url = https://github.com/DomCR/ACadSharp.git -[submodule "src/PdfSharp"] - path = src/PdfSharp - url = https://github.com/DomCR/PdfSharp.git diff --git a/src/ACadSharp b/src/ACadSharp index 52b9406..f9d36c1 160000 --- a/src/ACadSharp +++ b/src/ACadSharp @@ -1 +1 @@ -Subproject commit 52b9406e4b39fc795bc3b6966ddc997fd9e846e3 +Subproject commit f9d36c1856a43e0171f141e1915c25d4c8c47db8 diff --git a/src/ACadSharp.Pdf.Examples/ACadSharp.Pdf.Examples.csproj b/src/ACadSharp.Pdf.Examples/ACadSharp.Pdf.Examples.csproj index 6da8afa..31891b1 100644 --- a/src/ACadSharp.Pdf.Examples/ACadSharp.Pdf.Examples.csproj +++ b/src/ACadSharp.Pdf.Examples/ACadSharp.Pdf.Examples.csproj @@ -7,7 +7,6 @@ - diff --git a/src/ACadSharp.Pdf.Examples/PdfSharpExamples.cs b/src/ACadSharp.Pdf.Examples/PdfSharpExamples.cs deleted file mode 100644 index 05b6c15..0000000 --- a/src/ACadSharp.Pdf.Examples/PdfSharpExamples.cs +++ /dev/null @@ -1,95 +0,0 @@ -using PdfSharp.Drawing; -using PdfSharp.Pdf; - -namespace Example -{ - public static class PdfSharpExamples - { - public static void HelloWorld(string filename) - { - // Create a new PDF document - PdfDocument document = new PdfDocument(); - document.Info.Title = "Created with PDFsharp"; - - // Create an empty page - PdfPage page = document.AddPage(); - - // Get an XGraphics object for drawing - XGraphics gfx = XGraphics.FromPdfPage(page); - - // Create a font - XFont font = new XFont("Verdana", 20, XFontStyleEx.Bold); - - // Draw the text - gfx.DrawString("Hello, World!", font, XBrushes.Black, - new XRect(0, 0, page.Width.Point, page.Height.Point), - XStringFormats.Center); - - // Save the document... - document.Save(filename); - } - - public static void Landscape(string filename) - { - // Create a new PDF document - PdfDocument document = new PdfDocument(); - document.Info.Title = "Created with PDFsharp"; - - // Create an empty page - PdfPage page = document.AddPage(); - page.Orientation = PdfSharp.PageOrientation.Landscape; - - // Get an XGraphics object for drawing - XGraphics gfx = XGraphics.FromPdfPage(page); - - // Create a font - XFont font = new XFont("Verdana", 20, XFontStyleEx.Bold); - - // Draw the text - gfx.DrawString("Hello, World!", font, XBrushes.Black, - new XRect(0, 0, page.Width.Point, page.Height.Point), - XStringFormats.Center); - - // Save the document... - document.Save(filename); - } - - public static void DrawDiagonal(string filename) - { - PdfDocument document = new PdfDocument(); - - PdfPage page = document.AddPage(); - page.Height = new XUnit(10, XGraphicsUnit.Inch); - page.Width = new XUnit(10, XGraphicsUnit.Inch); - - var pen = new XPen(XColor.FromArgb(125, 0, 0), 0.05); - - XGraphics gfx = XGraphics.FromPdfPage(page); - - gfx.DrawLine(pen, 1, 2, page.Width.Point / 2, page.Height.Point / 2); - - // Save the document... - document.Save(filename); - } - - public static void DrawCircle(string filename) - { - PdfDocument document = new PdfDocument(); - - PdfPage page = document.AddPage(); - page.Height = new XUnit(10, XGraphicsUnit.Inch); - page.Width = new XUnit(10, XGraphicsUnit.Inch); - - var pen = new XPen(XColor.FromArgb(125, 0, 0), 0.5); - - XGraphics gfx = XGraphics.FromPdfPage(page); - - XRect rect = new XRect(0, 0, 500, 500); - gfx.DrawEllipse(pen, rect); - gfx.DrawEllipse(pen, 5, 5, 500, 500); - - // Save the document... - document.Save(filename); - } - } -} diff --git a/src/ACadSharp.Pdf.Examples/Program.cs b/src/ACadSharp.Pdf.Examples/Program.cs index 69e1b1e..9db5b82 100644 --- a/src/ACadSharp.Pdf.Examples/Program.cs +++ b/src/ACadSharp.Pdf.Examples/Program.cs @@ -1,5 +1,4 @@ using ACadSharp.IO; -using Example; using System.IO; namespace ACadSharp.Pdf.Examples @@ -11,13 +10,6 @@ internal class Program static void Main(string[] args) { - PdfSharpExamples.HelloWorld(Path.Combine(_outFolder, "PdfSharp", "helloworld.pdf")); - PdfSharpExamples.Landscape(Path.Combine(_outFolder, "PdfSharp", "Landscape.pdf")); - PdfSharpExamples.DrawDiagonal(Path.Combine(_outFolder, "PdfSharp", "Diagonal.pdf")); - PdfSharpExamples.DrawCircle(Path.Combine(_outFolder, "PdfSharp", "Circel.pdf")); - - return; - CadDocument doc = DwgReader.Read(Path.Combine(_folder, "export_sample.dwg"), NotificationHelper.LogConsoleNotification); string filename = Path.Combine(_folder, "export_sample_output.pdf"); diff --git a/src/ACadSharp.Pdf.sln b/src/ACadSharp.Pdf.sln index 0c60d68..ba0c0bf 100644 --- a/src/ACadSharp.Pdf.sln +++ b/src/ACadSharp.Pdf.sln @@ -11,10 +11,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Submodules", "Submodules", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ACadSharp", "ACadSharp\src\ACadSharp\ACadSharp.csproj", "{954E6718-3377-4F1F-8487-6A9412829661}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PdfSharp", "PdfSharp\src\foundation\src\PDFsharp\src\PdfSharp\PdfSharp.csproj", "{99A31D18-2FDD-46D5-81A1-788D3472E999}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PdfSharp.System", "PdfSharp\src\foundation\src\shared\src\PdfSharp.System\PdfSharp.System.csproj", "{062E62B0-6B93-4D77-A20A-E2BE4568E152}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C208F917-1B3F-4D17-B07A-5DB997793705}" ProjectSection(SolutionItems) = preProject ..\.editorconfig = ..\.editorconfig @@ -67,18 +63,6 @@ Global {954E6718-3377-4F1F-8487-6A9412829661}.Release|Any CPU.Build.0 = Release|Any CPU {954E6718-3377-4F1F-8487-6A9412829661}.Test|Any CPU.ActiveCfg = Test|Any CPU {954E6718-3377-4F1F-8487-6A9412829661}.Test|Any CPU.Build.0 = Test|Any CPU - {99A31D18-2FDD-46D5-81A1-788D3472E999}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {99A31D18-2FDD-46D5-81A1-788D3472E999}.Debug|Any CPU.Build.0 = Debug|Any CPU - {99A31D18-2FDD-46D5-81A1-788D3472E999}.Release|Any CPU.ActiveCfg = Release|Any CPU - {99A31D18-2FDD-46D5-81A1-788D3472E999}.Release|Any CPU.Build.0 = Release|Any CPU - {99A31D18-2FDD-46D5-81A1-788D3472E999}.Test|Any CPU.ActiveCfg = Debug|Any CPU - {99A31D18-2FDD-46D5-81A1-788D3472E999}.Test|Any CPU.Build.0 = Debug|Any CPU - {062E62B0-6B93-4D77-A20A-E2BE4568E152}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {062E62B0-6B93-4D77-A20A-E2BE4568E152}.Debug|Any CPU.Build.0 = Debug|Any CPU - {062E62B0-6B93-4D77-A20A-E2BE4568E152}.Release|Any CPU.ActiveCfg = Release|Any CPU - {062E62B0-6B93-4D77-A20A-E2BE4568E152}.Release|Any CPU.Build.0 = Release|Any CPU - {062E62B0-6B93-4D77-A20A-E2BE4568E152}.Test|Any CPU.ActiveCfg = Debug|Any CPU - {062E62B0-6B93-4D77-A20A-E2BE4568E152}.Test|Any CPU.Build.0 = Debug|Any CPU {0E7B7771-ABD9-4ABC-A626-7C73120248B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0E7B7771-ABD9-4ABC-A626-7C73120248B9}.Debug|Any CPU.Build.0 = Debug|Any CPU {0E7B7771-ABD9-4ABC-A626-7C73120248B9}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -91,8 +75,6 @@ Global EndGlobalSection GlobalSection(NestedProjects) = preSolution {954E6718-3377-4F1F-8487-6A9412829661} = {34398062-E8FA-40D9-876E-14DA65580159} - {99A31D18-2FDD-46D5-81A1-788D3472E999} = {34398062-E8FA-40D9-876E-14DA65580159} - {062E62B0-6B93-4D77-A20A-E2BE4568E152} = {34398062-E8FA-40D9-876E-14DA65580159} {78F069B8-0EF8-4703-9257-CBF5DC4022FA} = {C208F917-1B3F-4D17-B07A-5DB997793705} {52E48994-8A32-45F5-BB03-1D578AD6457E} = {78F069B8-0EF8-4703-9257-CBF5DC4022FA} {7950B9CB-883D-4065-8FD0-9A6822BB2FE2} = {34398062-E8FA-40D9-876E-14DA65580159} diff --git a/src/PdfSharp b/src/PdfSharp deleted file mode 160000 index f82a2d0..0000000 --- a/src/PdfSharp +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f82a2d05b6f7ab94ab0e3bc057f6445c22b963be