Skip to content

Commit

Permalink
Committed the samples
Browse files Browse the repository at this point in the history
  • Loading branch information
SowmiyaLoganathan committed Sep 5, 2022
1 parent 7846ea6 commit 6d73cbb
Show file tree
Hide file tree
Showing 2,392 changed files with 710,195 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.1000
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Convert-HTML-to-MHTML", "Convert-HTML-to-MHTML\Convert-HTML-to-MHTML.csproj", "{626CFE3C-4FAB-4E97-8952-B4AAC6698E1B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{626CFE3C-4FAB-4E97-8952-B4AAC6698E1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{626CFE3C-4FAB-4E97-8952-B4AAC6698E1B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{626CFE3C-4FAB-4E97-8952-B4AAC6698E1B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{626CFE3C-4FAB-4E97-8952-B4AAC6698E1B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {BBCC0E29-97FB-449B-B16C-B07A47317D3A}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
</configuration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?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>{626CFE3C-4FAB-4E97-8952-B4AAC6698E1B}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>Convert_HTML_to_MHTML</RootNamespace>
<AssemblyName>Convert-HTML-to-MHTML</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</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="Syncfusion.Compression.Base, Version=20.2460.0.45, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
<HintPath>..\packages\Syncfusion.Compression.Base.20.2.0.45\lib\net46\Syncfusion.Compression.Base.dll</HintPath>
</Reference>
<Reference Include="Syncfusion.HtmlConverter.Base, Version=20.2460.0.45, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
<HintPath>..\packages\Syncfusion.HtmlToPdfConverter.QtWebKit.WinForms.20.2.0.45\lib\net46\Syncfusion.HtmlConverter.Base.dll</HintPath>
</Reference>
<Reference Include="Syncfusion.Licensing, Version=20.2460.0.45, Culture=neutral, PublicKeyToken=632609b4d040f6b4, processorArchitecture=MSIL">
<HintPath>..\packages\Syncfusion.Licensing.20.2.0.45\lib\net46\Syncfusion.Licensing.dll</HintPath>
</Reference>
<Reference Include="Syncfusion.Pdf.Base, Version=20.2460.0.45, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
<HintPath>..\packages\Syncfusion.Pdf.WinForms.20.2.0.45\lib\net46\Syncfusion.Pdf.Base.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Syncfusion.HtmlToPdfConverter.QtWebKit.WinForms.20.2.0.45\build\net46\Syncfusion.HtmlToPdfConverter.QtWebKit.WinForms.targets" Condition="Exists('..\packages\Syncfusion.HtmlToPdfConverter.QtWebKit.WinForms.20.2.0.45\build\net46\Syncfusion.HtmlToPdfConverter.QtWebKit.WinForms.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Syncfusion.HtmlToPdfConverter.QtWebKit.WinForms.20.2.0.45\build\net46\Syncfusion.HtmlToPdfConverter.QtWebKit.WinForms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Syncfusion.HtmlToPdfConverter.QtWebKit.WinForms.20.2.0.45\build\net46\Syncfusion.HtmlToPdfConverter.QtWebKit.WinForms.targets'))" />
</Target>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using Syncfusion.HtmlConverter;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Convert_HTML_to_MHTML
{
class Program
{
static void Main(string[] args)
{
//Initialize HTML converter with WebKit rendering engine.
HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(HtmlRenderingEngine.WebKit);

//Convert URL to MHTML.
htmlConverter.ConvertToMhtml("http://www.syncfusion.com", "../../Data/Sample.mhtml");
}
}
}
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("Convert-HTML-to-MHTML")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Convert-HTML-to-MHTML")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[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("626cfe3c-4fab-4e97-8952-b4aac6698e1b")]

// 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")]
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Syncfusion.Compression.Base" version="20.2.0.45" targetFramework="net461" />
<package id="Syncfusion.HtmlToPdfConverter.QtWebKit.WinForms" version="20.2.0.45" targetFramework="net461" />
<package id="Syncfusion.Licensing" version="20.2.0.45" targetFramework="net461" />
<package id="Syncfusion.Pdf.WinForms" version="20.2.0.45" targetFramework="net461" />
</packages>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.3.32819.101
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Convert-HTML-to-SVG", "Convert-HTML-to-SVG\Convert-HTML-to-SVG.csproj", "{A7A62B80-B3AA-4412-B5A2-82E7E931DC84}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A7A62B80-B3AA-4412-B5A2-82E7E931DC84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A7A62B80-B3AA-4412-B5A2-82E7E931DC84}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A7A62B80-B3AA-4412-B5A2-82E7E931DC84}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A7A62B80-B3AA-4412-B5A2-82E7E931DC84}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4CE7C6D7-7067-4EE2-A648-14A5976E6A26}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>Convert_HTML_to_SVG</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Syncfusion.HtmlToPdfConverter.QtWebKit.Net.Core" Version="20.2.0.45" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// See https://aka.ms/new-console-template for more information

using Syncfusion.HtmlConverter;

//Initialize the HTML converter with the WebKit rendering engine.
HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(HtmlRenderingEngine.WebKit);

//Initialize the memory stream.
MemoryStream stream = new MemoryStream();

//Convert URL to SVG.
htmlConverter.ConvertToSvg("http://www.syncfusion.com", stream);

//Save the SVG file to disk.
using (FileStream output = new FileStream(Path.GetFullPath("../../../Sample.svg"), FileMode.Create))
{
stream.CopyTo(output);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.3.32819.101
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Convert-HTML-to-raster-image", "Convert-HTML-to-raster-image\Convert-HTML-to-raster-image.csproj", "{DB5FF039-59D2-40B9-ACFE-16CB643F65D8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{DB5FF039-59D2-40B9-ACFE-16CB643F65D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DB5FF039-59D2-40B9-ACFE-16CB643F65D8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DB5FF039-59D2-40B9-ACFE-16CB643F65D8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DB5FF039-59D2-40B9-ACFE-16CB643F65D8}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {34970B92-1674-4549-8B0F-5AD7FA8FEE9A}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>Convert_HTML_to_raster_image</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Syncfusion.HtmlToPdfConverter.QtWebKit.Net.Core" Version="20.2.0.45" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// See https://aka.ms/new-console-template for more information

using Syncfusion.Drawing;
using Syncfusion.HtmlConverter;

//Initialize HTML converter with WebKit rendering engine.
HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter();

//Convert URL to Image.
Image image = htmlConverter.ConvertToImage("http://www.google.com");

//Get image bytes.
byte[] imageByte = image.ImageData;

//Save the image.
File.WriteAllBytes(Path.GetFullPath("../../../Output.jpg"), imageByte);
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.3.32819.101
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Convert-MHTML-to-PDF-document", "Convert-MHTML-to-PDF-document\Convert-MHTML-to-PDF-document.csproj", "{18E98A00-8831-4DCE-AB3F-7D2D94E3E905}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{18E98A00-8831-4DCE-AB3F-7D2D94E3E905}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{18E98A00-8831-4DCE-AB3F-7D2D94E3E905}.Debug|Any CPU.Build.0 = Debug|Any CPU
{18E98A00-8831-4DCE-AB3F-7D2D94E3E905}.Release|Any CPU.ActiveCfg = Release|Any CPU
{18E98A00-8831-4DCE-AB3F-7D2D94E3E905}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {53365536-AEFC-4304-9D3C-4B38BF34932A}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>Convert_MHTML_to_PDF_document</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Syncfusion.HtmlToPdfConverter.QtWebKit.Net.Core" Version="20.2.0.45" />
</ItemGroup>

</Project>
Loading

0 comments on commit 6d73cbb

Please sign in to comment.