diff --git a/Ghostscript.NET.DisplayTest/Ghostscript.NET.DisplayTest.csproj b/Ghostscript.NET.DisplayTest/Ghostscript.NET.DisplayTest.csproj index 5c6891c..9fb3c99 100644 --- a/Ghostscript.NET.DisplayTest/Ghostscript.NET.DisplayTest.csproj +++ b/Ghostscript.NET.DisplayTest/Ghostscript.NET.DisplayTest.csproj @@ -1,19 +1,8 @@ - - + - Debug + net6.0-windows x86 - 8.0.30703 - 2.0 - {3509F0F7-A7AD-4FEE-B388-AA817F3413E9} WinExe - Properties - Ghostscript.NET.DisplayTest - Ghostscript.NET.DisplayTest - v4.8 - - - 512 @@ -22,116 +11,24 @@ - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false + false + true + true - true bin\x64\Debug\ - DEBUG;TRACE - full - AnyCPU - prompt true true - false bin\x64\Release\ - TRACE - true - pdbonly - AnyCPU - prompt true true - false - - - - - - - - - - Form - - - FMain.cs - - - Form - - - FPreview.cs - - - - - FMain.cs - - - FPreview.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - True - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - - - {8BDBDEEC-CAB1-4C0B-86C2-7B0D0D3FE363} - Ghostscript.NET - + - - - \ No newline at end of file diff --git a/Ghostscript.NET.DisplayTest/Properties/AssemblyInfo.cs b/Ghostscript.NET.DisplayTest/Properties/AssemblyInfo.cs deleted file mode 100644 index bb7f9a4..0000000 --- a/Ghostscript.NET.DisplayTest/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Ghostscript.NET.DisplayTest")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Habjan")] -[assembly: AssemblyProduct("Ghostscript.NET.DisplayTest")] -[assembly: AssemblyCopyright("Copyright © 2013-2021 Josip Habjan (habjan@gmail.com)")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("6655d0b4-fdcb-4dd2-869f-82ed57d92951")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.3")] -[assembly: AssemblyFileVersion("1.2.3")] diff --git a/Ghostscript.NET.Samples/Ghostscript.NET.Samples.csproj b/Ghostscript.NET.Samples/Ghostscript.NET.Samples.csproj index c0bf447..e230dbb 100644 --- a/Ghostscript.NET.Samples/Ghostscript.NET.Samples.csproj +++ b/Ghostscript.NET.Samples/Ghostscript.NET.Samples.csproj @@ -1,19 +1,8 @@ - - + - Debug + net6.0 x86 - 8.0.30703 - 2.0 - {4C7B5A1E-2172-48A8-8139-5CB7A3D6065F} Exe - Properties - Ghostscript.NET.Samples - Ghostscript.NET.Samples - v4.8 - - - 512 @@ -22,265 +11,44 @@ + false + Ghostscript.NET.Samples + Habjan + Ghostscript.NET.Samples + Copyright © 2013-2021 Josip Habjan %28habjan%40gmail.com%29 + 1.2.3 + 1.2.3 x64 - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false - true bin\x64\Debug\ - DEBUG;TRACE - full - AnyCPU - prompt true true - false - false bin\x64\Release\ - TRACE - true - pdbonly - AnyCPU - prompt true true - false - false - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.AWT.WinForms.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Beans.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Charsets.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Cldrdata.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Corba.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Core.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Jdbc.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Localedata.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Management.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Media.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Misc.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Naming.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Nashorn.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Remoting.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Security.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.SwingAWT.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Text.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Tools.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Util.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.XML.API.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.XML.Bind.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.XML.Crypto.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.XML.Parse.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.XML.Transform.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.XML.WebServices.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.XML.XPath.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.Runtime.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.Runtime.JNI.dll - - - ..\packages\itext.8.0.3\lib\net461\itext.barcodes.dll - - - ..\packages\itext.8.0.3\lib\net461\itext.bouncy-castle-connector.dll - - - ..\packages\itext.commons.8.0.3\lib\net461\itext.commons.dll - - - ..\packages\itext.8.0.3\lib\net461\itext.forms.dll - - - ..\packages\itext.8.0.3\lib\net461\itext.io.dll - - - ..\packages\itext.8.0.3\lib\net461\itext.kernel.dll - - - ..\packages\itext.8.0.3\lib\net461\itext.layout.dll - - - ..\packages\itext.8.0.3\lib\net461\itext.pdfa.dll - - - ..\packages\itext.8.0.3\lib\net461\itext.pdfua.dll - - - ..\packages\itext.8.0.3\lib\net461\itext.sign.dll - - - ..\packages\itext.8.0.3\lib\net461\itext.styledxmlparser.dll - - - ..\packages\itext.8.0.3\lib\net461\itext.svg.dll - - - ..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll - - - ..\packages\Microsoft.Extensions.DependencyInjection.5.0.0\lib\net461\Microsoft.Extensions.DependencyInjection.dll - - - ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.5.0.0\lib\net461\Microsoft.Extensions.DependencyInjection.Abstractions.dll - - - ..\packages\Microsoft.Extensions.Logging.5.0.0\lib\net461\Microsoft.Extensions.Logging.dll - - - ..\packages\Microsoft.Extensions.Logging.Abstractions.5.0.0\lib\net461\Microsoft.Extensions.Logging.Abstractions.dll - - - ..\packages\Microsoft.Extensions.Options.5.0.0\lib\net461\Microsoft.Extensions.Options.dll - - - ..\packages\Microsoft.Extensions.Primitives.5.0.0\lib\net461\Microsoft.Extensions.Primitives.dll - - - ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll - - - ..\packages\OpenJDK.BigMathNET.1.0.2.1\lib\net40\OpenJDK.BigMathNET.dll - - - - ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll - - - - ..\packages\System.Diagnostics.DiagnosticSource.5.0.0\lib\net46\System.Diagnostics.DiagnosticSource.dll - - - - - ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll - - - - ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll - - - ..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll - - - ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll - - - ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - {8BDBDEEC-CAB1-4C0B-86C2-7B0D0D3FE363} - Ghostscript.NET - + - - + + + + + + + + + + + + + + - - \ No newline at end of file diff --git a/Ghostscript.NET.Samples/Properties/AssemblyInfo.cs b/Ghostscript.NET.Samples/Properties/AssemblyInfo.cs index 4a5c532..02fd22f 100644 --- a/Ghostscript.NET.Samples/Properties/AssemblyInfo.cs +++ b/Ghostscript.NET.Samples/Properties/AssemblyInfo.cs @@ -1,16 +1,6 @@ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Ghostscript.NET.Samples")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Habjan")] -[assembly: AssemblyProduct("Ghostscript.NET.Samples")] -[assembly: AssemblyCopyright("Copyright © 2013-2021 Josip Habjan (habjan@gmail.com)")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -21,16 +11,3 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("a9c22027-b799-4221-b8e0-58a94add72a6")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.3")] -[assembly: AssemblyFileVersion("1.2.3")] diff --git a/Ghostscript.NET.Samples/packages.config b/Ghostscript.NET.Samples/packages.config deleted file mode 100644 index 932a1a8..0000000 --- a/Ghostscript.NET.Samples/packages.config +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Ghostscript.NET.VS2019.sln b/Ghostscript.NET.VS2019.sln index 85564f9..14369e8 100644 --- a/Ghostscript.NET.VS2019.sln +++ b/Ghostscript.NET.VS2019.sln @@ -1,15 +1,15 @@ - + Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.30907.101 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ghostscript.NET", "Ghostscript.NET\Ghostscript.NET.csproj", "{8BDBDEEC-CAB1-4C0B-86C2-7B0D0D3FE363}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ghostscript.NET", "Ghostscript.NET\Ghostscript.NET.csproj", "{8BDBDEEC-CAB1-4C0B-86C2-7B0D0D3FE363}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ghostscript.NET.Samples", "Ghostscript.NET.Samples\Ghostscript.NET.Samples.csproj", "{4C7B5A1E-2172-48A8-8139-5CB7A3D6065F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ghostscript.NET.Samples", "Ghostscript.NET.Samples\Ghostscript.NET.Samples.csproj", "{4C7B5A1E-2172-48A8-8139-5CB7A3D6065F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ghostscript.NET.DisplayTest", "Ghostscript.NET.DisplayTest\Ghostscript.NET.DisplayTest.csproj", "{3509F0F7-A7AD-4FEE-B388-AA817F3413E9}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ghostscript.NET.DisplayTest", "Ghostscript.NET.DisplayTest\Ghostscript.NET.DisplayTest.csproj", "{3509F0F7-A7AD-4FEE-B388-AA817F3413E9}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ghostscript.NET.Viewer", "Ghostscript.NET.Viewer\Ghostscript.NET.Viewer.csproj", "{C099EB3A-B4D7-4379-AFAB-4FCD4DF4F003}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ghostscript.NET.Viewer", "Ghostscript.NET.Viewer\Ghostscript.NET.Viewer.csproj", "{C099EB3A-B4D7-4379-AFAB-4FCD4DF4F003}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "root", "root", "{3AA07E8A-8E52-4E60-A6BB-A5991B5F829F}" ProjectSection(SolutionItems) = preProject diff --git a/Ghostscript.NET.Viewer/Ghostscript.NET.Viewer.csproj b/Ghostscript.NET.Viewer/Ghostscript.NET.Viewer.csproj index 2184ea0..104e03c 100644 --- a/Ghostscript.NET.Viewer/Ghostscript.NET.Viewer.csproj +++ b/Ghostscript.NET.Viewer/Ghostscript.NET.Viewer.csproj @@ -1,19 +1,8 @@ - - + - Debug + net6.0-windows x86 - 8.0.30703 - 2.0 - {C099EB3A-B4D7-4379-AFAB-4FCD4DF4F003} WinExe - Properties - Ghostscript.NET.Viewer - Ghostscript.NET.Viewer - v4.8 - - - 512 @@ -22,82 +11,13 @@ - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false + false + true + true _res\Ghostscript.NET.Viewer.Icon.ico - - - - - - - - - - - Form - - - FDebug.cs - - - Form - - - FMain.cs - - - - - - FDebug.cs - - - FMain.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - True - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - @@ -110,17 +30,6 @@ - - {8BDBDEEC-CAB1-4C0B-86C2-7B0D0D3FE363} - Ghostscript.NET - + - - \ No newline at end of file diff --git a/Ghostscript.NET.Viewer/Properties/AssemblyInfo.cs b/Ghostscript.NET.Viewer/Properties/AssemblyInfo.cs deleted file mode 100644 index cf8bbe0..0000000 --- a/Ghostscript.NET.Viewer/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Ghostscript.NET.Viewer")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Habjan")] -[assembly: AssemblyProduct("Ghostscript.NET.Viewer")] -[assembly: AssemblyCopyright("Copyright © 2013-2021 Josip Habjan (habjan@gmail.com)")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("49a5f948-aef2-46cf-a79e-e7c68e5f114b")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.3")] -[assembly: AssemblyFileVersion("1.2.3")] diff --git a/Ghostscript.NET/FacturX/PDFConverter.cs b/Ghostscript.NET/FacturX/PDFConverter.cs index 2136a92..571072e 100644 --- a/Ghostscript.NET/FacturX/PDFConverter.cs +++ b/Ghostscript.NET/FacturX/PDFConverter.cs @@ -14,6 +14,8 @@ using Ghostscript.NET.Processor; using Microsoft.Extensions.FileProviders.Embedded; using Microsoft.Extensions.FileProviders; + +using Ghostscript.NET.FacturX.ZUGFeRD; /// /// ''' Klasse um per Ghostscript.net/Ghostscript beliebige PDFs in PDF/A-3 Dateien zu konvertieren diff --git a/Ghostscript.NET/FacturX/ZUGFeRD/ZUGFeRDImporter.cs b/Ghostscript.NET/FacturX/ZUGFeRD/ZUGFeRDImporter.cs index fed64d2..d7d7958 100644 --- a/Ghostscript.NET/FacturX/ZUGFeRD/ZUGFeRDImporter.cs +++ b/Ghostscript.NET/FacturX/ZUGFeRD/ZUGFeRDImporter.cs @@ -25,8 +25,8 @@ namespace Ghostscript.NET.FacturX.ZUGFeRD - using Item = org.mustangproject.Item; - using Product = org.mustangproject.Product; + using Item = Ghostscript.NET.FacturX.ZUGFeRD.Item; + using Product = Ghostscript.NET.FacturX.ZUGFeRD.Product; using Document = org.w3c.dom.Document; using Node = org.w3c.dom.Node; using NodeList = org.w3c.dom.NodeList; @@ -263,7 +263,6 @@ public bool FromPDF(string pPDFFile) return true; } - return false; } diff --git a/Ghostscript.NET/Ghostscript.NET.csproj b/Ghostscript.NET/Ghostscript.NET.csproj index f40fae5..bd63cb0 100644 --- a/Ghostscript.NET/Ghostscript.NET.csproj +++ b/Ghostscript.NET/Ghostscript.NET.csproj @@ -1,18 +1,13 @@ - - - + - Debug - AnyCPU - 8.0.30703 - 2.0 - {8BDBDEEC-CAB1-4C0B-86C2-7B0D0D3FE363} + net6.0 Library - Properties - Ghostscript.NET - Ghostscript.NET - v4.8 - 512 + enable + enable + true + true + true + @@ -21,58 +16,27 @@ - - - + false - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AnyCPU true - false bin\Debug\Ghostscript.NET.XML - pdbonly - true - bin\Release\ - TRACE - prompt - 4 true - AnyCPU - false bin\Release\Ghostscript.NET.xml - true bin\x64\Debug\ - DEBUG;TRACE true - full - AnyCPU - prompt false false - false bin\x64\Release\ - TRACE - true - pdbonly - AnyCPU - prompt false false true - false true @@ -82,229 +46,19 @@ false + Ghostscript.NET + Managed wrapper library around the Ghostscript native library %2832-bit & 64-bit%29, an interpreter for the PostScript language, PDF, related software and documentation. + Habjan + Ghostscript.NET + Copyright © 2013-2021 by Josip Habjan %28habjan%40gmail.com%29. All Rights Reserved. + 1.2.3 + 1.2.3 - - true - - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.AWT.WinForms.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Beans.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Charsets.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Cldrdata.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Corba.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Core.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Jdbc.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Localedata.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Management.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Media.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Misc.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Naming.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Nashorn.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Remoting.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Security.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.SwingAWT.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Text.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Tools.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Util.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.XML.API.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.XML.Bind.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.XML.Crypto.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.XML.Parse.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.XML.Transform.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.XML.WebServices.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.XML.XPath.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.Runtime.dll - - - ..\packages\IKVM.8.1.5717.0\lib\IKVM.Runtime.JNI.dll - - - ..\packages\Microsoft.Extensions.FileProviders.Abstractions.8.0.0\lib\net462\Microsoft.Extensions.FileProviders.Abstractions.dll - - - ..\packages\Microsoft.Extensions.FileProviders.Embedded.8.0.3\lib\net462\Microsoft.Extensions.FileProviders.Embedded.dll - - - ..\packages\Microsoft.Extensions.Primitives.8.0.0\lib\net462\Microsoft.Extensions.Primitives.dll - - - ..\packages\OpenJDK.BigMathNET.1.0.2.1\lib\net40\OpenJDK.BigMathNET.dll - - - - ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll - - - - ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll - - - - ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll - - - ..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - - - - Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}". - - - - - - \ No newline at end of file diff --git a/Ghostscript.NET/PDFConverter.cs b/Ghostscript.NET/PDFConverter.cs deleted file mode 100644 index c94a9ad..0000000 --- a/Ghostscript.NET/PDFConverter.cs +++ /dev/null @@ -1,507 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Globalization; -using System.IO; -using System.Linq; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Security; -using System.Text; -using System.Threading.Tasks; -using Microsoft.VisualBasic; -using System.Xml; -using Ghostscript.NET; -using Ghostscript.NET.Processor; -using Microsoft.Extensions.FileProviders.Embedded; -using Microsoft.Extensions.FileProviders; -namespace org.mustangproject; -/// - -/// ''' Klasse um per Ghostscript.net/Ghostscript beliebige PDFs in PDF/A-3 Dateien zu konvertieren - -/// ''' - -/// ''' -public class PDFConverter -{ - private string? file_GSDLL_DLL = null; - private readonly string? file_AdobeRGB1998_ICC = null; - private readonly string? file_BIGSCRIPT_PS = null; - - private readonly string resourceDir = Path.GetTempPath(); - private GhostscriptVersionInfo? gsVersion = null; - - protected string mPDFInFile = ""; // 08.06.20 - protected string mPDFOutFile = ""; - protected string? mXMLOutFile = null; - protected string FXVersion = "1.0"; - protected Profile usedProfile=Profiles.getByName("EN16931"); - - - /// - /// ''' Konstruktor mit Angabe Datenbankdatei, intern-nummer, KlassenID (und Gruppenpositionen) wenn ZUGFeRD geschrieben werden soll - /// ''' - /// ''' PDF-Eingabedatei - /// ''' PDF-A/3 Ausgabedatei - public PDFConverter(string pPDFInFile, string pPDFOutFile) - { - file_AdobeRGB1998_ICC = this.resourceDir+"\\AdobeCompat-v2.icc"; - file_BIGSCRIPT_PS = this.resourceDir+"\\pdfconvert.ps"; - - mPDFInFile = pPDFInFile; - mPDFOutFile = pPDFOutFile; - } - public PDFConverter setFXVersion(string pZFVersion) { - FXVersion = pZFVersion; - - return this; - } - public PDFConverter setFXProfile(Profile p) { - usedProfile = p; - - return this; - } - - - /// - /// ''' Erlaubt die Angabe einer einzubettenden XML-Datei. Die Ausgabe wird dann inkl. RDF-Metadaten und PDF/A-Schema Extension zur ZUGFeRD-Datei in der in - /// ''' pZFVersion angegebenen Version (2p0 fr 2.0, 2.0.1 sowie 2.1, 2.1.1) - /// ''' - /// ''' - /// ''' - public void EmbedXMLForZF(string pXMLOutFile, string pZFVersion) - { - mXMLOutFile = pXMLOutFile; - } - - - - public void prepareICC() - { - var embeddedProvider = new EmbeddedFileProvider(Assembly.GetExecutingAssembly()); - using (var reader = embeddedProvider.GetFileInfo("assets\\AdobeRGB1998.icc").CreateReadStream()) - { - byte[] data = new BinaryReader(reader).ReadBytes((int)reader.Length); - string tempfilename = Path.GetTempPath() + "AdobeRGB1998.icc"; - File.WriteAllBytes(tempfilename, data); - } - } - - - /// - /// ''' Schreibt eine Postscript-, genauer gesagt PDFMark-Datei die von Ghostscript interpretiert werden kann und mindestens in eine PDF-A/3 umwandelt - /// ''' - /// ''' - /// ''' ICC-Farbprofildatei bspw von https://www.adobe.com/support/downloads/iccprofiles/iccprofiles_win.html - /// ''' - protected void WritePDFMark(string pEmbeddedAdobeRGB1998ICCFile) - { - string EscapedEmbeddedXMLFile = ""; - - if (mXMLOutFile != null) - { - if (!File.Exists(mXMLOutFile)) - { - throw new Exception("Datei " + mXMLOutFile + " existiert nicht"); - } - EscapedEmbeddedXMLFile = mXMLOutFile.Replace(@"\", @"\\"); // in PDFMark werden \ zu \\ gequoted - } - - - - if (!File.Exists(pEmbeddedAdobeRGB1998ICCFile)) - { - throw new Exception("Datei " + file_AdobeRGB1998_ICC + " existiert nicht"); - } - /* if (!pEmbeddedAdobeRGB1998ICCFile.Contains(Directory.GetCurrentDirectory())) - { - throw new Exception("Datei " + file_AdobeRGB1998_ICC + " muss unterhalb des absolut angegebenen Applikationspfades " + Directory.GetCurrentDirectory() + " liegen."); - } - */ - string EscapedEmbeddedICCFile = file_AdobeRGB1998_ICC.Replace(Directory.GetCurrentDirectory(), @".\").Replace(@"\", @"\\"); - - if (mPDFInFile == mPDFOutFile) - { - throw new Exception("Eingabedatei darf nicht Ausgabedatei sein"); - } - - string pdfMarkA3 = @"%! - -%Title - -[ /Title (Mustangproject.org .net) - /DOCINFO pdfmark - -% Define entries in the document Info dictionary : -/ICCProfile (" + EscapedEmbeddedICCFile + @") % Customise -def - -% Define an ICC profile : - -[/_objdef {icc_PDFA} /type /stream /OBJ pdfmark -[{icc_PDFA} -<< - /N currentpagedevice /ProcessColorModel known { - currentpagedevice /ProcessColorModel get dup /DeviceGray eq - {pop 1} { - /DeviceRGB eq - {3}{4} ifelse - } ifelse - } { - (ERROR, unable to determine ProcessColorModel) == flush - } ifelse ->> /PUT pdfmark - -[{icc_PDFA} ICCProfile (r) file /PUT pdfmark - -% Define the output intent dictionary : - -[/_objdef {OutputIntent_PDFA} /type /dict /OBJ pdfmark -[{OutputIntent_PDFA} << - /Type /OutputIntent % Must be so (the standard requires). - /S /GTS_PDFA1 % Must be so (the standard requires). - /DestOutputProfile {icc_PDFA} % Must be so (see above). - /OutputConditionIdentifier (sRGB) % Customize ->> /PUT pdfmark - -[{Catalog} <> /PUT pdfmark -"; - - string PDFmark = pdfMarkA3; - if (mXMLOutFile != null) - { - // Dim myFile As New FileInfo(mXMLOutFile) - // Dim sizeInBytes As Long = myFile.Length - FileInfo fi = new FileInfo(mXMLOutFile); - long sizeInBytes = fi.Length; - - string rdfFXProfile="EN 16931"; - - string pfdMarkZugferd = @" - -% istring SimpleUTF16BE ostring -/SimpleUTF16BE -{ - dup length - 1 add - 2 mul - string - - % istring ostring - dup 0 16#FE put - dup 1 16#FF put - 2 - 3 -1 roll - - % ostring index istring - { - % ostring index ichar - 3 1 roll - % ichar ostring index - 2 copy 16#00 put - 1 add - 2 copy - 5 -1 roll - % ostring index ostring index ichar - put - 1 add - % ostring index - } - forall - - % ostring index - pop -} -bind def - -/XmlFileName (factur-x.xml) def -/XmlFileDesc (invoice) def -/XmlFileDate (D:" + DateTime.Now.ToString("yyyyMMddHHmmssK").Replace(":", "'") + @"') def -/XmlFileData (" + EscapedEmbeddedXMLFile + @") (r) file def - - - - % Object {ContentStream} anlegen und befllen - [ - /_objdef {ContentStream} - /type /stream - /OBJ pdfmark - - [ - {ContentStream} << - /Type /EmbeddedFile - /Subtype (text/xml) cvn - /Params << - /ModDate XmlFileDate - /Size " + sizeInBytes + @" - >> - >> - /PUT pdfmark - - [ - {ContentStream} XmlFileData - /PUT pdfmark - - [ - {ContentStream} - /CLOSE pdfmark - - % Object {FSDict} fr File Specification anlegen und befllen - [ - /_objdef {FSDict} - /type /dict - /OBJ pdfmark - - [ - {FSDict} << - /Type /FileSpec - /F XmlFileName - /UF XmlFileName SimpleUTF16BE - /Desc XmlFileDesc - /AFRelationship /Alternative - /EF << - /F {ContentStream} - /UF {ContentStream} - >> - >> - /PUT pdfmark - - % Object {AFArray} fr Associated Files anlegen und befllen - [ - /_objdef {AFArray} - /type /array - /OBJ pdfmark - - [ - {AFArray} {FSDict} - /APPEND pdfmark - - - - % Associated Files im Object {Catalog} eintragen - [ - {Catalog} << - /AF {AFArray} - >> - /PUT pdfmark - - - - % File Specification unter Names/Embedded Files/Names im Object {Catalog} eintragen - [ - /Name XmlFileName - /FS {FSDict} - /EMBED pdfmark - - % Metadata im Object {Catalog} eintragen - [ - /XML ( - - - - - Factur-x PDFA Extension Schema - urn:factur-x:pdfa:CrossIndustryDocument:invoice:1p0# - fx - - - - DocumentFileName - Text - external - Name of the embedded XML invoice file - - - DocumentType - Text - external - INVOICE - - - Version - Text - external - The actual version of the ZUGFeRD data - - - ConformanceLevel - Text - external - The conformance level of the ZUGFeRD data - - - - - - - - - - - INVOICE - factur-x.xml - " + FXVersion + @" - " + usedProfile.getXMPName() +@" - - - ) - /Ext_Metadata pdfmark"; - PDFmark += pfdMarkZugferd; - } - - - - UTF8Encoding utf8 = new UTF8Encoding(false); // kein BOM verwenden, s. https://docs.microsoft.com/de-de/dotnet/api/system.text.utf8encoding?view=netcore-3.1 - File.WriteAllBytes(file_BIGSCRIPT_PS, utf8.GetBytes(PDFmark)); - - } - - // - // Prft ob die Ausgabedatei beschrieben werden kann - // - public bool IsFileLocked(FileInfo file) - { - FileStream stream = (FileStream)null; - try - { - stream = file.Open(FileMode.Open, FileAccess.ReadWrite, FileShare.None); - } - catch (IOException generatedExceptionName) - { - // handle the exception your way - return true; - } - finally - { - if (stream != null) - stream.Close(); - } - return false; - } - - - /// - /// ''' Wandelt eine PDF-Datei (Dateiname in inputfile) in eine PDF A/3 (Outputfilename) um und hngt die aktuelle E-rechnung an - /// ''' - /// ''' True wenn die Konvertierung funktioniert hat - public bool ConvertToPDFA3(String gsdll) - { - - file_GSDLL_DLL=gsdll; - gsVersion = new GhostscriptVersionInfo(file_GSDLL_DLL); - - this.prepareICC(); - - // based on https://github.com/jhabjan/Ghostscript.NET/blob/master/Ghostscript.NET.Samples/Samples/ProcessorSample1.cs - if (!File.Exists(file_GSDLL_DLL)) - { - throw new Exception("Ghostscript DLL " + file_GSDLL_DLL + " bitte ins Verzeichnis " + Directory.GetCurrentDirectory() + " kopieren"); - - } - - if (!File.Exists(file_AdobeRGB1998_ICC)) - { - throw new Exception("Farbpprofile " + file_AdobeRGB1998_ICC + " bitte ins Verzeichnis " + Directory.GetCurrentDirectory() + " kopieren"); - - } - if (!File.Exists(mPDFInFile)) - { - throw new Exception("Eingabedatei " + mPDFInFile + " existiert nicht"); - - } - if (File.Exists(mPDFOutFile)) - { - if (FileSystem.GetAttr(mPDFOutFile) == Constants.vbReadOnly) - { - throw new Exception("Ausgabedatei " + mPDFOutFile + " keine Schreibrechte"); - - - } - FileInfo fi = new FileInfo(mPDFOutFile); - if (IsFileLocked(fi)) - { - throw new Exception("Ausgabedatei " + mPDFOutFile + " nicht beschreibbar (noch geffnet?)"); - - } - } - - // Info: braucht folgende DLLs: - // BouncyCastle.Crypto.dll, Common.Logging.Core.dll, Common.Logging.dll - // und: etliche, weitere der iText*.dll -> vorsichtshalber alle 9 kopiert - /* PdfDocument doc = new PdfDocument(new PdfReader(mPDFInFile)); - PdfAConformanceLevel comLev = doc.GetReader().GetPdfAConformanceLevel(); - if (comLev != null) - { - } - - */ - - - - WritePDFMark(file_AdobeRGB1998_ICC); - - // MsgBox(gsVersion.ToString) - GhostscriptLibrary gsL = null/* TODO Change to default(_) if this is not a reference type */; - // Dim gsL As GhostscriptLibrary = New GhostscriptLibrary(File.ReadAllBytes(ClsCommon.JS.StartupDir & ClsEDocs_Base.FixedValues.FILENAME_ZF_GSDLL32)) - gsL = new GhostscriptLibrary(gsVersion); - GhostscriptPipedOutput gsPipedOutput = new GhostscriptPipedOutput(); - - List switches = new List(); - // works : "C:\Program Files (x86)\gs\gs9.52\bin\gswin32c.exe" -dPDFA=1 -dNOOUTERSAVE -sProcessColorModel=DeviceRGB -sDEVICE=pdfwrite -o RG_10690-pdfa.pdf -dPDFACompatibilityPolicy=1 "C:\Program Files (x86)\gs\gs9.52\lib\PDFA_def.ps" RG_10690.pdf - // "C:\Program Files (x86)\gs\gs9.52\bin\gswin64c.exe" -dPDFA=1 -dNOOUTERSAVE -sProcessColorModel=DeviceRGB -sDEVICE=pdfwrite -o RG_10690-pdfa.pdf -dPDFACompatibilityPolicy=1 "C:\Program Files (x86)\gs\gs9.52\lib\PDFA_def.ps" RG_10690.pdf - switches.Add(""); // ' Der allererste Parameter wird mitunter ignoriert weil EXEs da ihren eigenen Namen bergeben bekommen - switches.Add("-P"); // Zugriff auf Ressourcen unterhalb des aktuellen Verzeichnisses erlauben - switches.Add("-dPDFA=3"); // 'in A/3 umwandeln Teil 1 von 3 - // switches.Add("-dCompressStreams=false") ''hatten mal Probleme weil scheinbar auch die XMP Metadaten von ZUGFeRD komprimiert wurden, das hat sich mittlerweile erledigt - switches.Add("-sColorConversionStrategy=RGB"); // ' muss fr PDF/A angegeben werden - switches.Add("-sDEVICE=pdfwrite"); // ' ein Device muss frs Rastern angegeben werden - switches.Add("-o" + mPDFOutFile); // ' Ausgabedatei - switches.Add("-dPDFACompatibilityPolicy=1"); // 'in A/3 umwandeln Teil 2 von 3 - switches.Add("-dRenderIntent=3"); // 'in A/3 umwandeln Teil 3 von 3 - switches.Add("-sGenericResourceDir=\"" + resourceDir + "/\""); // ' hier kann ein zustzliches Verzeichnis angegeben werden in dem Ressourcen wie die icc-Datei liegen drfen - switches.Add(file_BIGSCRIPT_PS); // ' die PDFMark-Programmdatei die interpretiert werden soll. Anders als die ICC und ggf. einzubettende XML-Datei ist das keine Ressourcendatei und die kann liegen wo sie will. - // siehe https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/pdfmark_reference.pdf - // und https://gitlab.com/crossref/pdfmark - switches.Add(mPDFInFile); // ' PDF-Eingabedatei - - bool success = false; - using (GhostscriptProcessor gsProcessor = new GhostscriptProcessor(gsL)) - { - VerboseMsgBoxOutput stdio = new VerboseMsgBoxOutput(); - // gsProcessor.StartProcessing(switches.ToArray(), stdio) - gsProcessor.StartProcessing(switches.ToArray(), null/* TODO Change to default(_) if this is not a reference type */); - - // (erfolglose) Versuche, das Hngen zu vermeiden... - gsProcessor.Dispose(); - } - success = true; - return success; - } - - // - // Zum Debuggen von Ghostscript ist es manchmal hilfreich, die Ausgabe in MsgBoxes umleiten zu knnen - // Bekannte Fehlercodes -100: Datei nicht gefunden oder nicht beschreibbar - // - public class VerboseMsgBoxOutput : GhostscriptStdIO - { - public VerboseMsgBoxOutput() : base(true, true, true) - { - } - - public override void StdOut(string output) - { - Console.Write("Out:" + output); - } - - public override void StdError(string error) - { - Console.Write("Error:" + error); - } - - public override void StdIn(out string input, int count) - { - input = "debug input"; - } - } -} diff --git a/Ghostscript.NET/Properties/AssemblyInfo.cs b/Ghostscript.NET/Properties/AssemblyInfo.cs index 6fbe3af..8d83b80 100644 --- a/Ghostscript.NET/Properties/AssemblyInfo.cs +++ b/Ghostscript.NET/Properties/AssemblyInfo.cs @@ -1,20 +1,9 @@ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - -[assembly: AssemblyTitle("Ghostscript.NET")] -[assembly: AssemblyDescription("Managed wrapper library around the Ghostscript native library (32-bit & 64-bit), an interpreter for the PostScript language, PDF, related software and documentation.")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Habjan")] -[assembly: AssemblyProduct("Ghostscript.NET")] -[assembly: AssemblyCopyright("Copyright © 2013-2021 by Josip Habjan (habjan@gmail.com). All Rights Reserved.")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] [assembly: Guid("5b1fe89e-e040-4b7a-9c05-478c1756b6e8")] - - -[assembly: AssemblyVersion("1.2.3")] -[assembly: AssemblyFileVersion("1.2.3")] \ No newline at end of file diff --git a/Ghostscript.NET/packages.config b/Ghostscript.NET/packages.config deleted file mode 100644 index 9fc4e96..0000000 --- a/Ghostscript.NET/packages.config +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file