diff --git a/Source/Demo/ConsoleApplication/HtmlRenderer.Demo.ConsoleApplication.csproj b/Source/Demo/ConsoleApplication/HtmlRenderer.Demo.ConsoleApplication.csproj new file mode 100644 index 000000000..67a0c137d --- /dev/null +++ b/Source/Demo/ConsoleApplication/HtmlRenderer.Demo.ConsoleApplication.csproj @@ -0,0 +1,65 @@ + + + + + Debug + AnyCPU + {7CA59714-E309-4285-A3E9-F2C66D222649} + Exe + HtmlRenderer.Demo.ConsoleApplication + htmltopdf + v2.0 + 512 + true + + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\packages\PDFsharp.1.50.4000-beta3b\lib\net20\PdfSharp.dll + + + ..\..\packages\PDFsharp.1.50.4000-beta3b\lib\net20\PdfSharp.Charting.dll + + + + + + + + + + + + + + + + {ca249f5d-9285-40a6-b217-5889ef79fd7e} + HtmlRenderer.PdfSharp + + + {fe611685-391f-4e3e-b27e-d3150e51e49b} + HtmlRenderer + + + + \ No newline at end of file diff --git a/Source/Demo/ConsoleApplication/Program.cs b/Source/Demo/ConsoleApplication/Program.cs new file mode 100644 index 000000000..b40c21e91 --- /dev/null +++ b/Source/Demo/ConsoleApplication/Program.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using TheArtOfDev.HtmlRenderer.PdfSharp; + +namespace HtmlRenderer.Demo.ConsoleApplication +{ + class Program + { + static void Main(string[] args) + { + if(args.Length != 2) + { + Console.WriteLine("Usage: htmltopdf [input-file] [output-file]"); + return; + } + + var pdf = PdfGenerator.GeneratePdf(File.ReadAllText(args[0]), PdfSharp.PageSize.A4); + pdf.Save(args[1]); + } + } +} diff --git a/Source/Demo/ConsoleApplication/Properties/AssemblyInfo.cs b/Source/Demo/ConsoleApplication/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..5e3aff1ca --- /dev/null +++ b/Source/Demo/ConsoleApplication/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +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("HtmlToPdfConsole")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("HtmlToPdfConsole")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[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("7ca59714-e309-4285-a3e9-f2c66d222649")] + +// 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.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Source/Demo/ConsoleApplication/packages.config b/Source/Demo/ConsoleApplication/packages.config new file mode 100644 index 000000000..2f092fd78 --- /dev/null +++ b/Source/Demo/ConsoleApplication/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Source/HtmlRenderer.sln b/Source/HtmlRenderer.sln index cf7aaa634..3c5ce83e8 100644 --- a/Source/HtmlRenderer.sln +++ b/Source/HtmlRenderer.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.30501.0 +# Visual Studio 15 +VisualStudioVersion = 15.0.27130.2020 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Demo", "Demo", "{E263EA16-2E6A-4269-A319-AA2F97ADA8E1}" EndProject @@ -26,6 +26,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{AA47D1 .nuget\NuGet.targets = .nuget\NuGet.targets EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HtmlRenderer.Demo.ConsoleApplication", "Demo\ConsoleApplication\HtmlRenderer.Demo.ConsoleApplication.csproj", "{7CA59714-E309-4285-A3E9-F2C66D222649}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -106,6 +108,18 @@ Global {CA249F5D-9285-40A6-B217-5889EF79FD7E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {CA249F5D-9285-40A6-B217-5889EF79FD7E}.Release|Mixed Platforms.Build.0 = Release|Any CPU {CA249F5D-9285-40A6-B217-5889EF79FD7E}.Release|x86.ActiveCfg = Release|Any CPU + {7CA59714-E309-4285-A3E9-F2C66D222649}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7CA59714-E309-4285-A3E9-F2C66D222649}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7CA59714-E309-4285-A3E9-F2C66D222649}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {7CA59714-E309-4285-A3E9-F2C66D222649}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {7CA59714-E309-4285-A3E9-F2C66D222649}.Debug|x86.ActiveCfg = Debug|Any CPU + {7CA59714-E309-4285-A3E9-F2C66D222649}.Debug|x86.Build.0 = Debug|Any CPU + {7CA59714-E309-4285-A3E9-F2C66D222649}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7CA59714-E309-4285-A3E9-F2C66D222649}.Release|Any CPU.Build.0 = Release|Any CPU + {7CA59714-E309-4285-A3E9-F2C66D222649}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {7CA59714-E309-4285-A3E9-F2C66D222649}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {7CA59714-E309-4285-A3E9-F2C66D222649}.Release|x86.ActiveCfg = Release|Any CPU + {7CA59714-E309-4285-A3E9-F2C66D222649}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -114,5 +128,9 @@ Global {2390B71F-9400-47F4-B23A-7F2649C87D35} = {E263EA16-2E6A-4269-A319-AA2F97ADA8E1} {8AD34FE8-8382-4A8A-B3AA-A0392ED42423} = {E263EA16-2E6A-4269-A319-AA2F97ADA8E1} {F02E0216-4AE3-474F-9381-FCB93411CDB0} = {E263EA16-2E6A-4269-A319-AA2F97ADA8E1} + {7CA59714-E309-4285-A3E9-F2C66D222649} = {E263EA16-2E6A-4269-A319-AA2F97ADA8E1} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {16CE6CC4-C826-4C57-A251-0DB95B282DDB} EndGlobalSection EndGlobal