Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{7CA59714-E309-4285-A3E9-F2C66D222649}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>HtmlRenderer.Demo.ConsoleApplication</RootNamespace>
<AssemblyName>htmltopdf</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="PdfSharp, Version=1.50.4000.0, Culture=neutral, PublicKeyToken=f94615aa0424f9eb, processorArchitecture=MSIL">
<HintPath>..\..\packages\PDFsharp.1.50.4000-beta3b\lib\net20\PdfSharp.dll</HintPath>
</Reference>
<Reference Include="PdfSharp.Charting, Version=1.50.4000.0, Culture=neutral, PublicKeyToken=f94615aa0424f9eb, processorArchitecture=MSIL">
<HintPath>..\..\packages\PDFsharp.1.50.4000-beta3b\lib\net20\PdfSharp.Charting.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Drawing" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\HtmlRenderer.PdfSharp\HtmlRenderer.PdfSharp.csproj">
<Project>{ca249f5d-9285-40a6-b217-5889ef79fd7e}</Project>
<Name>HtmlRenderer.PdfSharp</Name>
</ProjectReference>
<ProjectReference Include="..\..\HtmlRenderer\HtmlRenderer.csproj">
<Project>{fe611685-391f-4e3e-b27e-d3150e51e49b}</Project>
<Name>HtmlRenderer</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
23 changes: 23 additions & 0 deletions Source/Demo/ConsoleApplication/Program.cs
Original file line number Diff line number Diff line change
@@ -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]);
}
}
}
36 changes: 36 additions & 0 deletions Source/Demo/ConsoleApplication/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -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")]
4 changes: 4 additions & 0 deletions Source/Demo/ConsoleApplication/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="PDFsharp" version="1.50.4000-beta3b" targetFramework="net20" />
</packages>
22 changes: 20 additions & 2 deletions Source/HtmlRenderer.sln
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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