diff --git a/.gitignore b/.gitignore index ce3a150ad..185d75be4 100644 --- a/.gitignore +++ b/.gitignore @@ -107,4 +107,6 @@ _UpgradeReport_Files/ Backup*/ UpgradeLog*.XML -*.DotSettings \ No newline at end of file +*.DotSettings +/.vs +/Source/.vs/HtmlRenderer/DesignTimeBuild diff --git a/Source/Demo/WinForms/Program.cs b/Source/Demo/WinForms/Program.cs index f01eb6d0a..40ec76691 100644 --- a/Source/Demo/WinForms/Program.cs +++ b/Source/Demo/WinForms/Program.cs @@ -15,6 +15,7 @@ using System.IO; using System.Reflection; using System.Windows.Forms; +using TheArtOfDev.HtmlRenderer.Core; namespace TheArtOfDev.HtmlRenderer.Demo.WinForms { @@ -30,6 +31,7 @@ private static void Main() Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); + HtmlContainerInt.ImagesSecurityProtocol = System.Net.SecurityProtocolType.Tls; Application.Run(new DemoForm()); // Application.Run(new PerfForm()); diff --git a/Source/HtmlRenderer.PdfSharp/HtmlRenderer.PdfSharp.csproj b/Source/HtmlRenderer.PdfSharp/HtmlRenderer.PdfSharp.csproj index ef0fd7acc..ac2cd56cf 100644 --- a/Source/HtmlRenderer.PdfSharp/HtmlRenderer.PdfSharp.csproj +++ b/Source/HtmlRenderer.PdfSharp/HtmlRenderer.PdfSharp.csproj @@ -1,90 +1,20 @@ - - - + - Debug - AnyCPU - {CA249F5D-9285-40A6-B217-5889EF79FD7E} - Library - Properties - TheArtOfDev.HtmlRenderer.PdfSharp - HtmlRenderer.PdfSharp - v2.0 - 512 - ..\ - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 + net20 + 1.5.2 + HTML Renderer + Open source hosted on CodePlex + HTML Renderer + Copyright © 2008 + 1.5.2-alpha + true - - ..\packages\PDFsharp.1.50.4000-beta3b\lib\net20\PdfSharp.dll - True - - - ..\packages\PDFsharp.1.50.4000-beta3b\lib\net20\PdfSharp.Charting.dll - True - + + - - - Properties\SharedAssemblyInfo.cs - - - - - - - - - - - - - - - - - - {fe611685-391f-4e3e-b27e-d3150e51e49b} - HtmlRenderer - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - \ No newline at end of file diff --git a/Source/HtmlRenderer/Core/Handlers/ImageDownloader.cs b/Source/HtmlRenderer/Core/Handlers/ImageDownloader.cs index 2f8b0f5e6..310800484 100644 --- a/Source/HtmlRenderer/Core/Handlers/ImageDownloader.cs +++ b/Source/HtmlRenderer/Core/Handlers/ImageDownloader.cs @@ -48,9 +48,9 @@ internal sealed class ImageDownloader : IDisposable /// private readonly Dictionary> _imageDownloadCallbacks = new Dictionary>(); - public ImageDownloader() + public ImageDownloader(SecurityProtocolType securityProtocolType) { - ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072; + ServicePointManager.SecurityProtocol = securityProtocolType; } /// diff --git a/Source/HtmlRenderer/Core/HtmlContainerInt.cs b/Source/HtmlRenderer/Core/HtmlContainerInt.cs index 1d71de9fb..e060357b9 100644 --- a/Source/HtmlRenderer/Core/HtmlContainerInt.cs +++ b/Source/HtmlRenderer/Core/HtmlContainerInt.cs @@ -13,6 +13,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; +using System.Net; using TheArtOfDev.HtmlRenderer.Adapters; using TheArtOfDev.HtmlRenderer.Adapters.Entities; using TheArtOfDev.HtmlRenderer.Core.Dom; @@ -79,6 +80,8 @@ namespace TheArtOfDev.HtmlRenderer.Core /// public sealed class HtmlContainerInt : IDisposable { + public static SecurityProtocolType ImagesSecurityProtocol { get; set; } = (SecurityProtocolType)3072; + #region Fields and Consts /// @@ -517,7 +520,7 @@ public void SetHtml(string htmlSource, CssData baseCssData = null) if (_root != null) { _selectionHandler = new SelectionHandler(_root); - _imageDownloader = new ImageDownloader(); + _imageDownloader = new ImageDownloader(ImagesSecurityProtocol); } } } diff --git a/Source/HtmlRenderer/HtmlRenderer.csproj b/Source/HtmlRenderer/HtmlRenderer.csproj index 74549b41d..b8abde96f 100644 --- a/Source/HtmlRenderer/HtmlRenderer.csproj +++ b/Source/HtmlRenderer/HtmlRenderer.csproj @@ -1,129 +1,16 @@  - - + - Debug - AnyCPU - {FE611685-391F-4E3E-B27E-D3150E51E49B} - Library - Properties - TheArtOfDev.HtmlRenderer - HtmlRenderer - v2.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 + net20 + 1.5.2-alpha + true - - - + - - - Properties\SharedAssemblyInfo.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Source/SharedAssemblyInfo.cs b/Source/SharedAssemblyInfo.cs index d5336037f..ffd859a9f 100644 --- a/Source/SharedAssemblyInfo.cs +++ b/Source/SharedAssemblyInfo.cs @@ -5,7 +5,6 @@ // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("HTML Renderer")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Open source hosted on CodePlex")] @@ -26,4 +25,5 @@ // Version information for an assembly consists of the following four values: -[assembly: AssemblyVersion("1.5.1.0")] \ No newline at end of file +[assembly: AssemblyVersion("1.5.1.0")] +[assembly: AssemblyFileVersion("1.5.1.0")] \ No newline at end of file