From 2b7fc20ed3a9e51c82edae93546c00e58518388f Mon Sep 17 00:00:00 2001 From: Vincent Frebel Date: Mon, 2 Sep 2024 13:22:53 +0200 Subject: [PATCH] fixed PixelFormat compiling error --- .../Ghostscript.NET.DisplayTest.csproj | 12 ++-- .../Ghostscript.NET.Samples.csproj | 13 ++-- Ghostscript.NET.Samples/Program.cs | 61 +++++++++---------- Ghostscript.NET.VS2022.sln | 43 +++++++++++++ .../Ghostscript.NET.Viewer.csproj | 12 ++-- Ghostscript.NET/Ghostscript.NET.csproj | 13 ++-- 6 files changed, 89 insertions(+), 65 deletions(-) create mode 100644 Ghostscript.NET.VS2022.sln diff --git a/Ghostscript.NET.DisplayTest/Ghostscript.NET.DisplayTest.csproj b/Ghostscript.NET.DisplayTest/Ghostscript.NET.DisplayTest.csproj index 9fb3c99..2b5ed86 100644 --- a/Ghostscript.NET.DisplayTest/Ghostscript.NET.DisplayTest.csproj +++ b/Ghostscript.NET.DisplayTest/Ghostscript.NET.DisplayTest.csproj @@ -3,14 +3,10 @@ net6.0-windows x86 WinExe - - - - - - - - + + + + false true true diff --git a/Ghostscript.NET.Samples/Ghostscript.NET.Samples.csproj b/Ghostscript.NET.Samples/Ghostscript.NET.Samples.csproj index e230dbb..33842bb 100644 --- a/Ghostscript.NET.Samples/Ghostscript.NET.Samples.csproj +++ b/Ghostscript.NET.Samples/Ghostscript.NET.Samples.csproj @@ -3,14 +3,10 @@ net6.0 x86 Exe - - - - - - - - + + + + false Ghostscript.NET.Samples Habjan @@ -46,7 +42,6 @@ - diff --git a/Ghostscript.NET.Samples/Program.cs b/Ghostscript.NET.Samples/Program.cs index b78352e..ce2dbe7 100644 --- a/Ghostscript.NET.Samples/Program.cs +++ b/Ghostscript.NET.Samples/Program.cs @@ -26,40 +26,37 @@ using System; using System.Collections.Generic; -using Ghostscript.NET.Viewer; +using Ghostscript.NET; +using Ghostscript.NET.Samples; -namespace Ghostscript.NET.Samples -{ - class Program - { - static void Main(string[] args) - { - Console.WriteLine("Ghostscript.NET Samples"); - - if (!GhostscriptVersionInfo.IsGhostscriptInstalled) - { - throw new Exception("You don't have Ghostscript installed on this machine!"); - } +Console.WriteLine("Ghostscript.NET Samples"); - ISample sample; - - //sample = new GetInkCoverageSample(); - //sample = new ProcessorSample1(); - //sample = new ProcessorSample2(); - //sample = new FindInstalledGhostscriptVersionsSample(); - //sample = new RunMultipleInstancesSample(); - //sample = new ViewerSample(); - sample = new RasterizerSample1(); - //sample = new RasterizerSample2(); - //sample = new AddWatermarkSample(); - //sample = new DeviceUsageSample(); - //sample = new PipedOutputSample(); - //sample = new SendToPrinterSample(); - //sample = new RasterizerCropSample(); +if (!GhostscriptVersionInfo.IsGhostscriptInstalled) +{ + throw new Exception("You don't have Ghostscript installed on this machine!"); +} - sample.Start(); +List samples = new() +{ + //new GetInkCoverageSample(), + //new ProcessorSample1(), + //new ProcessorSample2(), + //new FindInstalledGhostscriptVersionsSample(), + //new RunMultipleInstancesSample(), + //new ViewerSample(), + //new RasterizerSample1(), + //new RasterizerSample2(), + //new AddWatermarkSample(), + //new DeviceUsageSample(), + //new PipedOutputSample(), + //new SendToPrinterSample(), + new FacturXWriteSample() +}; - Console.ReadLine(); - } - } +foreach (ISample sample in samples) +{ + sample.Start(); + Console.WriteLine($"Sample '{sample.GetType().Name}' run successful!"); } + +Console.ReadLine(); diff --git a/Ghostscript.NET.VS2022.sln b/Ghostscript.NET.VS2022.sln new file mode 100644 index 0000000..e4ae929 --- /dev/null +++ b/Ghostscript.NET.VS2022.sln @@ -0,0 +1,43 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.10.34928.147 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ghostscript.NET", "Ghostscript.NET\Ghostscript.NET.csproj", "{C3553CA6-33AF-4137-A5C2-73D57A8DAF43}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ghostscript.NET.DisplayTest", "Ghostscript.NET.DisplayTest\Ghostscript.NET.DisplayTest.csproj", "{FDB623A5-8362-47BA-9145-781B574962DA}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ghostscript.NET.Samples", "Ghostscript.NET.Samples\Ghostscript.NET.Samples.csproj", "{749F1BE2-A1BE-4C89-B94B-A2F1E38E03EB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ghostscript.NET.Viewer", "Ghostscript.NET.Viewer\Ghostscript.NET.Viewer.csproj", "{194189A8-3558-4D92-9573-01BCAF85912F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C3553CA6-33AF-4137-A5C2-73D57A8DAF43}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C3553CA6-33AF-4137-A5C2-73D57A8DAF43}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C3553CA6-33AF-4137-A5C2-73D57A8DAF43}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C3553CA6-33AF-4137-A5C2-73D57A8DAF43}.Release|Any CPU.Build.0 = Release|Any CPU + {FDB623A5-8362-47BA-9145-781B574962DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FDB623A5-8362-47BA-9145-781B574962DA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FDB623A5-8362-47BA-9145-781B574962DA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FDB623A5-8362-47BA-9145-781B574962DA}.Release|Any CPU.Build.0 = Release|Any CPU + {749F1BE2-A1BE-4C89-B94B-A2F1E38E03EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {749F1BE2-A1BE-4C89-B94B-A2F1E38E03EB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {749F1BE2-A1BE-4C89-B94B-A2F1E38E03EB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {749F1BE2-A1BE-4C89-B94B-A2F1E38E03EB}.Release|Any CPU.Build.0 = Release|Any CPU + {194189A8-3558-4D92-9573-01BCAF85912F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {194189A8-3558-4D92-9573-01BCAF85912F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {194189A8-3558-4D92-9573-01BCAF85912F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {194189A8-3558-4D92-9573-01BCAF85912F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {51B9DE2F-D521-41F2-9AC0-DB8F8587A599} + EndGlobalSection +EndGlobal diff --git a/Ghostscript.NET.Viewer/Ghostscript.NET.Viewer.csproj b/Ghostscript.NET.Viewer/Ghostscript.NET.Viewer.csproj index 104e03c..a170316 100644 --- a/Ghostscript.NET.Viewer/Ghostscript.NET.Viewer.csproj +++ b/Ghostscript.NET.Viewer/Ghostscript.NET.Viewer.csproj @@ -3,14 +3,10 @@ net6.0-windows x86 WinExe - - - - - - - - + + + + false true true diff --git a/Ghostscript.NET/Ghostscript.NET.csproj b/Ghostscript.NET/Ghostscript.NET.csproj index bd63cb0..ba8b944 100644 --- a/Ghostscript.NET/Ghostscript.NET.csproj +++ b/Ghostscript.NET/Ghostscript.NET.csproj @@ -8,14 +8,10 @@ true true - - - - - - - - + + + + false @@ -59,6 +55,7 @@ + \ No newline at end of file