Skip to content

Commit 96169be

Browse files
Merge pull request #134 from ArtifexSoftware/maksym-dev
updates for new nuget package
2 parents 56f90f5 + aa42dcb commit 96169be

File tree

58 files changed

+2133
-1355
lines changed

Some content is hidden

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

58 files changed

+2133
-1355
lines changed

Description.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
**Ghostscript.NET** is the most completed managed wrapper library around the [Ghostscript](https://ghostscript.com) library - an interpreter for PDF and PostScript files.
2+
3+
### Features
4+
5+
- View PDF, EPS or multi-page PostScript files on the screen.
6+
- Rasterize PDF, EPS or multi-page PostScript files to any common image format.
7+
- An easy way to call a Ghostscript library with a custom arguments / switches.
8+
- Allows you to rasterize files in memory without storing the output to disk.
9+
- Supports zoom-in and zoom-out.
10+
- Supports progressive update.
11+
- Allows you to run multiple Ghostscript instances simultaneously within a single process.
12+
- Compatible with 32-bit and 64-bit Ghostscript native library.
Lines changed: 9 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,8 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1+
<Project Sdk="Microsoft.NET.Sdk">
32
<PropertyGroup>
4-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
3+
<TargetFramework>net6.0-windows</TargetFramework>
54
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
6-
<ProductVersion>8.0.30703</ProductVersion>
7-
<SchemaVersion>2.0</SchemaVersion>
8-
<ProjectGuid>{3509F0F7-A7AD-4FEE-B388-AA817F3413E9}</ProjectGuid>
95
<OutputType>WinExe</OutputType>
10-
<AppDesignerFolder>Properties</AppDesignerFolder>
11-
<RootNamespace>Ghostscript.NET.DisplayTest</RootNamespace>
12-
<AssemblyName>Ghostscript.NET.DisplayTest</AssemblyName>
13-
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
14-
<TargetFrameworkProfile>
15-
</TargetFrameworkProfile>
16-
<FileAlignment>512</FileAlignment>
176
<SccProjectName>
187
</SccProjectName>
198
<SccLocalPath>
@@ -22,112 +11,27 @@
2211
</SccAuxPath>
2312
<SccProvider>
2413
</SccProvider>
25-
</PropertyGroup>
26-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
27-
<PlatformTarget>AnyCPU</PlatformTarget>
28-
<DebugSymbols>true</DebugSymbols>
29-
<DebugType>full</DebugType>
30-
<Optimize>false</Optimize>
31-
<OutputPath>bin\Debug\</OutputPath>
32-
<DefineConstants>DEBUG;TRACE</DefineConstants>
33-
<ErrorReport>prompt</ErrorReport>
34-
<WarningLevel>4</WarningLevel>
35-
</PropertyGroup>
36-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
37-
<PlatformTarget>AnyCPU</PlatformTarget>
38-
<DebugType>pdbonly</DebugType>
39-
<Optimize>true</Optimize>
40-
<OutputPath>bin\Release\</OutputPath>
41-
<DefineConstants>TRACE</DefineConstants>
42-
<ErrorReport>prompt</ErrorReport>
43-
<WarningLevel>4</WarningLevel>
14+
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
15+
<UseWindowsForms>true</UseWindowsForms>
16+
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
4417
</PropertyGroup>
4518
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
46-
<DebugSymbols>true</DebugSymbols>
4719
<OutputPath>bin\x64\Debug\</OutputPath>
48-
<DefineConstants>DEBUG;TRACE</DefineConstants>
49-
<DebugType>full</DebugType>
50-
<PlatformTarget>AnyCPU</PlatformTarget>
51-
<ErrorReport>prompt</ErrorReport>
5220
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
5321
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
5422
</PropertyGroup>
5523
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
5624
<OutputPath>bin\x64\Release\</OutputPath>
57-
<DefineConstants>TRACE</DefineConstants>
58-
<Optimize>true</Optimize>
59-
<DebugType>pdbonly</DebugType>
60-
<PlatformTarget>AnyCPU</PlatformTarget>
61-
<ErrorReport>prompt</ErrorReport>
6225
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
6326
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
6427
</PropertyGroup>
28+
<PropertyGroup>
29+
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
30+
</PropertyGroup>
6531
<ItemGroup>
66-
<Reference Include="System" />
67-
<Reference Include="System.Core" />
68-
<Reference Include="System.Data" />
69-
<Reference Include="System.Drawing" />
70-
<Reference Include="System.Windows.Forms" />
71-
</ItemGroup>
72-
<ItemGroup>
73-
<Compile Include="Callbacks\StdIOHandler.cs" />
74-
<Compile Include="FMain.cs">
75-
<SubType>Form</SubType>
76-
</Compile>
77-
<Compile Include="FMain.Designer.cs">
78-
<DependentUpon>FMain.cs</DependentUpon>
79-
</Compile>
80-
<Compile Include="FPreview.cs">
81-
<SubType>Form</SubType>
82-
</Compile>
83-
<Compile Include="FPreview.Designer.cs">
84-
<DependentUpon>FPreview.cs</DependentUpon>
85-
</Compile>
86-
<Compile Include="Program.cs" />
87-
<Compile Include="Properties\AssemblyInfo.cs" />
88-
<EmbeddedResource Include="FMain.resx">
89-
<DependentUpon>FMain.cs</DependentUpon>
90-
</EmbeddedResource>
91-
<EmbeddedResource Include="FPreview.resx">
92-
<DependentUpon>FPreview.cs</DependentUpon>
93-
</EmbeddedResource>
94-
<EmbeddedResource Include="Properties\Resources.resx">
95-
<Generator>ResXFileCodeGenerator</Generator>
96-
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
97-
<SubType>Designer</SubType>
98-
</EmbeddedResource>
99-
<Compile Include="Properties\Resources.Designer.cs">
100-
<AutoGen>True</AutoGen>
101-
<DependentUpon>Resources.resx</DependentUpon>
102-
<DesignTime>True</DesignTime>
103-
</Compile>
104-
<None Include="app.config" />
105-
<None Include="Properties\Settings.settings">
106-
<Generator>SettingsSingleFileGenerator</Generator>
107-
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
108-
</None>
109-
<Compile Include="Properties\Settings.Designer.cs">
110-
<AutoGen>True</AutoGen>
111-
<DependentUpon>Settings.settings</DependentUpon>
112-
<DesignTimeSharedInput>True</DesignTimeSharedInput>
113-
</Compile>
114-
</ItemGroup>
115-
<ItemGroup>
116-
<ProjectReference Include="..\Ghostscript.NET\Ghostscript.NET.csproj">
117-
<Project>{8BDBDEEC-CAB1-4C0B-86C2-7B0D0D3FE363}</Project>
118-
<Name>Ghostscript.NET</Name>
119-
</ProjectReference>
32+
<ProjectReference Include="..\Ghostscript.NET\Ghostscript.NET.csproj" />
12033
</ItemGroup>
121-
<ItemGroup />
12234
<ItemGroup>
12335
<Content Include="_res\ghostscript-dotnet.png" />
12436
</ItemGroup>
125-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
126-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
127-
Other similar extension points exist, see Microsoft.Common.targets.
128-
<Target Name="BeforeBuild">
129-
</Target>
130-
<Target Name="AfterBuild">
131-
</Target>
132-
-->
13337
</Project>

Ghostscript.NET.DisplayTest/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 36 deletions
This file was deleted.

Ghostscript.NET.DisplayTest/Properties/Resources.Designer.cs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Ghostscript.NET.DisplayTest/Properties/Settings.Designer.cs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Ghostscript.NET.PDFA3Converter.Samples/Ghostscript.NET.PDFA3Converter.Samples.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
<TargetFramework>net6.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
8+
<Platforms>AnyCPU;x64</Platforms>
89
</PropertyGroup>
910

1011
<ItemGroup>
1112
<PackageReference Include="ZUGFeRD-csharp" Version="14.1.0" />
1213
</ItemGroup>
1314

1415
<ItemGroup>
15-
<ProjectReference Include="..\..\Ghostscript.net\Ghostscript.NET\Ghostscript.NET.csproj" />
16-
<ProjectReference Include="..\Ghostscript.NET.PDFA3Converter\Ghostscript.NET.PDFA3Converter.csproj" />
16+
<ProjectReference Include="..\Ghostscript.NET\Ghostscript.NET.csproj" />
1717
</ItemGroup>
1818

1919
<ItemGroup>

Ghostscript.NET.PDFA3Converter.Samples/Program.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Program
3030
{
3131
static void Main(string[] args)
3232
{
33-
Console.WriteLine("Ghostscript.NET Samples");
33+
Console.WriteLine("Ghostscript.NET PDFA3Converter.Samples");
3434

3535
if (!GhostscriptVersionInfo.IsGhostscriptInstalled)
3636
{
@@ -45,7 +45,6 @@ static void Main(string[] args)
4545
sample = new FacturXWithZUGFeRDcsharpSample();
4646
sample.Start();
4747

48-
4948
Console.ReadLine();
5049
}
5150
}

Ghostscript.NET.PDFA3Converter.Samples/Samples/FacturXWithMustangSample.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,17 @@
2727
using Ghostscript.NET.Processor;
2828
using System.IO;
2929
using Ghostscript.NET.PDFA3Converter;
30-
using Ghostscript.NET.PDFA3Converter.Samples.ZUGFeRD;
30+
using Ghostscript.NET.PDFA3Converter.ZUGFeRD;
3131

3232

3333
namespace Ghostscript.NET.PDFA3Converter.Samples
3434
{
3535
public class FacturXWithMustangSample : ISample
3636
{
3737
public void Start()
38-
{
38+
{
39+
Console.WriteLine(Environment.NewLine);
40+
Console.WriteLine("Running FacturXWithMustangSample");
3941
Invoice i = (new Invoice()).setDueDate(DateTime.Now).setIssueDate(DateTime.Now).setDeliveryDate(DateTime.Now).setSender((new TradeParty("Test company", "Test Street 1", "55232", "Test City", "DE")).addTaxID("DE4711").addVATID("DE0815").setContact(new Contact("Hans Test", "+49123456789", "test@example.org")).addBankDetails(new BankDetails("DE12500105170648489890", "COBADEFXXX"))).setRecipient(new TradeParty("Franz Müller", "Test Steet 12", "55232", "Entenhausen", "DE")).setReferenceNumber("991-01484-64").setNumber("123").
4042
addItem(new Item(new Product("Test product", "", "C62", 19m), 1.0m, 1.0m));
4143

@@ -47,7 +49,11 @@ public void Start()
4749
string outfilename = "factur-x.xml";
4850
File.WriteAllBytes(outfilename, zf2p.getXML());
4951

50-
PDFA3Converter converter = new PDFA3Converter(@"d:\gs\gs9.56.1\bin\gsdll64.dll");
52+
string gsFilePath = @"C:\Program Files\gs\gs10.05.0\bin\gsdll64.dll";
53+
Console.WriteLine("Using Ghostscript filepath: " + gsFilePath);
54+
Console.WriteLine("Ensure this is the filepath to your installed Ghostscript!");
55+
56+
PDFA3Converter converter = new PDFA3Converter(gsFilePath);
5157

5258
converter.SetZUGFeRDProfile(Profiles.getByName("EN16931").getXMPName());
5359
converter.SetZUGFeRDVersion("2.3");

Ghostscript.NET.PDFA3Converter.Samples/Samples/FacturXWithZUGFeRDcsharpSample.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,16 @@ public class FacturXWithZUGFeRDcsharpSample : ISample
3636
{
3737
public void Start()
3838
{
39+
Console.WriteLine(Environment.NewLine);
40+
Console.WriteLine("Running FacturXWithZUGFeRDcsharpSample");
3941
string outFilename = "factur-x.xml";
4042
InvoiceDescriptor invoice = CreateInvoice();
4143
invoice.Save(outFilename, ZUGFeRDVersion.Version22, s2industries.ZUGFeRD.Profile.Comfort);
4244

43-
PDFA3Converter converter = new PDFA3Converter(@"d:\gs\gs9.56.1\bin\gsdll64.dll");
45+
string gsFilePath = @"C:\Program Files\gs\gs10.05.0\bin\gsdll64.dll";
46+
Console.WriteLine("Using Ghostscript filepath: "+ gsFilePath);
47+
Console.WriteLine("Ensure this is the filepath to your installed Ghostscript!");
48+
PDFA3Converter converter = new PDFA3Converter(gsFilePath);
4449
converter.SetZUGFeRDProfile("EN 16931");
4550
converter.SetZUGFeRDVersion("2.3");
4651
converter.SetEmbeddedXMLFile(outFilename);

0 commit comments

Comments
 (0)