-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WF-65944 Added PDF to HTML sample project.
- Loading branch information
1 parent
c0a5119
commit 8dc9924
Showing
9 changed files
with
176 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
Document conversion/Convert-PDF-to-HTML/Convert-PDF-to-HTML.sln
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-PDF-to-HTML", "Convert-PDF-to-HTML\Convert-PDF-to-HTML.csproj", "{6A6BCFB0-E8F1-4B05-9CE3-18E68B58F6E6}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{6A6BCFB0-E8F1-4B05-9CE3-18E68B58F6E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{6A6BCFB0-E8F1-4B05-9CE3-18E68B58F6E6}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{6A6BCFB0-E8F1-4B05-9CE3-18E68B58F6E6}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{6A6BCFB0-E8F1-4B05-9CE3-18E68B58F6E6}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {B02776AE-F9D8-474D-8472-E6FDA515AF42} | ||
EndGlobalSection | ||
EndGlobal |
6 changes: 6 additions & 0 deletions
6
Document conversion/Convert-PDF-to-HTML/Convert-PDF-to-HTML/App.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.7.2" /> | ||
</startup> | ||
</configuration> |
Binary file added
BIN
+6 KB
.../Convert-PDF-to-HTML/Convert-PDF-to-HTML/Assemblies/Syncfusion.PdfToHtmlConverter.OPX.dll
Binary file not shown.
Binary file added
BIN
+1.53 MB
...ersion/Convert-PDF-to-HTML/Convert-PDF-to-HTML/Assemblies/Syncfusion.PdfToHtmlWrapper.dll
Binary file not shown.
69 changes: 69 additions & 0 deletions
69
Document conversion/Convert-PDF-to-HTML/Convert-PDF-to-HTML/Convert-PDF-to-HTML.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<?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>{6A6BCFB0-E8F1-4B05-9CE3-18E68B58F6E6}</ProjectGuid> | ||
<OutputType>Exe</OutputType> | ||
<RootNamespace>Convert_PDF_to_HTML</RootNamespace> | ||
<AssemblyName>Convert-PDF-to-HTML</AssemblyName> | ||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> | ||
<Deterministic>true</Deterministic> | ||
</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=21.1460.38.0, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\Syncfusion.Compression.Base.21.1.38\lib\net46\Syncfusion.Compression.Base.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Syncfusion.Licensing, Version=21.1460.38.0, Culture=neutral, PublicKeyToken=632609b4d040f6b4, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\Syncfusion.Licensing.21.1.38\lib\net46\Syncfusion.Licensing.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Syncfusion.Pdf.Base, Version=21.1460.38.0, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\Syncfusion.Pdf.WinForms.21.1.38\lib\net46\Syncfusion.Pdf.Base.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Syncfusion.PdfToHtmlConverter.OPX"> | ||
<HintPath>Assemblies\Syncfusion.PdfToHtmlConverter.OPX.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Syncfusion.PdfToHtmlWrapper"> | ||
<HintPath>Assemblies\Syncfusion.PdfToHtmlWrapper.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" /> | ||
</Project> |
Binary file added
BIN
+4.84 KB
Document conversion/Convert-PDF-to-HTML/Convert-PDF-to-HTML/Data/Barcode.pdf
Binary file not shown.
34 changes: 34 additions & 0 deletions
34
Document conversion/Convert-PDF-to-HTML/Convert-PDF-to-HTML/Program.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using Syncfusion.Pdf.Parsing; | ||
using Syncfusion.PdfToHtmlConverter; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Convert_PDF_to_HTML | ||
{ | ||
internal class Program | ||
{ | ||
static void Main(string[] args) | ||
{ | ||
//Initializing PDF to HTML converter. | ||
PdfToHtmlConverter converter = new PdfToHtmlConverter(); | ||
|
||
//Initializing and applying PDF to HTML converter settings. | ||
PdfToHtmlConverterSettings setting = new PdfToHtmlConverterSettings(); | ||
setting.IsFrame = false; | ||
setting.AbsolutePositioning = false; | ||
converter.Settings = setting; | ||
|
||
//Loading the input PDF document. | ||
PdfLoadedDocument loadedDocument = new PdfLoadedDocument("../../Data/Barcode.pdf"); | ||
|
||
//Converting PDF to HTML file. | ||
converter.Convert("../../Data/Barcode.pdf", "Output.html", loadedDocument.Pages.Count); | ||
|
||
//Close the PDF document. | ||
loadedDocument.Close(true); | ||
} | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
Document conversion/Convert-PDF-to-HTML/Convert-PDF-to-HTML/Properties/AssemblyInfo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-PDF-to-HTML")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("Convert-PDF-to-HTML")] | ||
[assembly: AssemblyCopyright("Copyright © 2023")] | ||
[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("6a6bcfb0-e8f1-4b05-9ce3-18e68b58f6e6")] | ||
|
||
// 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")] |
6 changes: 6 additions & 0 deletions
6
Document conversion/Convert-PDF-to-HTML/Convert-PDF-to-HTML/packages.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="Syncfusion.Compression.Base" version="21.1.38" targetFramework="net472" /> | ||
<package id="Syncfusion.Licensing" version="21.1.38" targetFramework="net472" /> | ||
<package id="Syncfusion.Pdf.WinForms" version="21.1.38" targetFramework="net472" /> | ||
</packages> |