-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f3d9bed
commit ef667ff
Showing
28 changed files
with
448 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
Getting Started/Docker/Alpine/Convert Excel to PDF/Convert-Excel-to-PDF.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.5.33516.290 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Convert-Excel-to-PDF", "Convert-Excel-to-PDF\Convert-Excel-to-PDF.csproj", "{3C0F53AF-5189-4A52-8CE4-C08FFF0D6190}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{3C0F53AF-5189-4A52-8CE4-C08FFF0D6190}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{3C0F53AF-5189-4A52-8CE4-C08FFF0D6190}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{3C0F53AF-5189-4A52-8CE4-C08FFF0D6190}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{3C0F53AF-5189-4A52-8CE4-C08FFF0D6190}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {6E0207BB-0167-420A-853D-B02542FCF3CB} | ||
EndGlobalSection | ||
EndGlobal |
16 changes: 16 additions & 0 deletions
16
...arted/Docker/Alpine/Convert Excel to PDF/Convert-Excel-to-PDF/Convert-Excel-to-PDF.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,16 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>netcoreapp3.1</TargetFramework> | ||
<RootNamespace>Convert_Excel_to_PDF</RootNamespace> | ||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.17.2" /> | ||
<PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="2.88.5" /> | ||
<PackageReference Include="Syncfusion.XlsIORenderer.Net.Core" Version="23.1.36" /> | ||
</ItemGroup> | ||
|
||
</Project> |
9 changes: 9 additions & 0 deletions
9
.../Docker/Alpine/Convert Excel to PDF/Convert-Excel-to-PDF/Convert-Excel-to-PDF.csproj.user
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,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<ActiveDebugProfile>Docker</ActiveDebugProfile> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> | ||
<DebuggerFlavor>ProjectDebugger</DebuggerFlavor> | ||
</PropertyGroup> | ||
</Project> |
Binary file added
BIN
+12 KB
...g Started/Docker/Alpine/Convert Excel to PDF/Convert-Excel-to-PDF/Data/InputTemplate.xlsx
Binary file not shown.
22 changes: 22 additions & 0 deletions
22
Getting Started/Docker/Alpine/Convert Excel to PDF/Convert-Excel-to-PDF/Dockerfile
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,22 @@ | ||
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging. | ||
|
||
FROM mcr.microsoft.com/dotnet/aspnet:3.1-alpine3.12 AS base | ||
RUN apk update && apk upgrade && apk add fontconfig | ||
RUN apk add --update ttf-dejavu fontconfig | ||
WORKDIR /app | ||
|
||
FROM mcr.microsoft.com/dotnet/sdk:3.1-alpine3.12 AS build | ||
WORKDIR /src | ||
COPY ["Convert-Excel-to-PDF.csproj", "."] | ||
RUN dotnet restore "./Convert-Excel-to-PDF.csproj" | ||
COPY . . | ||
WORKDIR "/src/." | ||
RUN dotnet build "Convert-Excel-to-PDF.csproj" -c Release -o /app/build | ||
|
||
FROM build AS publish | ||
RUN dotnet publish "Convert-Excel-to-PDF.csproj" -c Release -o /app/publish | ||
|
||
FROM base AS final | ||
WORKDIR /app | ||
COPY --from=publish /app/publish . | ||
ENTRYPOINT ["dotnet", "Convert-Excel-to-PDF.dll"] |
32 changes: 32 additions & 0 deletions
32
Getting Started/Docker/Alpine/Convert Excel to PDF/Convert-Excel-to-PDF/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,32 @@ | ||
using Syncfusion.Pdf; | ||
using Syncfusion.XlsIO; | ||
using System; | ||
using System.IO; | ||
using Syncfusion.XlsIORenderer; | ||
|
||
namespace Convert_Excel_to_PDF | ||
{ | ||
internal class Program | ||
{ | ||
static void Main(string[] args) | ||
{ | ||
using (ExcelEngine excelEngine = new ExcelEngine()) | ||
{ | ||
IApplication application = excelEngine.Excel; | ||
application.DefaultVersion = ExcelVersion.Xlsx; | ||
FileStream excelStream = new FileStream("Data/InputTemplate.xlsx", FileMode.Open, FileAccess.Read); | ||
IWorkbook workbook = application.Workbooks.Open(excelStream); | ||
|
||
//Initialize XlsIO renderer. | ||
XlsIORenderer renderer = new XlsIORenderer(); | ||
|
||
//Convert Excel document into PDF document | ||
PdfDocument pdfDocument = renderer.ConvertToPDF(workbook); | ||
|
||
//Create the FileStream to save the converted PDF. | ||
FileStream pdfStream = new FileStream("Output.pdf", FileMode.Create, FileAccess.ReadWrite); | ||
pdfDocument.Save(pdfStream); | ||
} | ||
} | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
...ed/Docker/Alpine/Convert Excel to PDF/Convert-Excel-to-PDF/Properties/launchSettings.json
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,10 @@ | ||
{ | ||
"profiles": { | ||
"Convert-Excel-to-PDF": { | ||
"commandName": "Project" | ||
}, | ||
"Docker": { | ||
"commandName": "Docker" | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
Getting Started/Docker/Debian/Convert Excel to PDF/Convert-Excel-to-PDF.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.5.33516.290 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Convert-Excel-to-PDF", "Convert-Excel-to-PDF\Convert-Excel-to-PDF.csproj", "{35079D1C-422A-48FE-B150-23BBAC13BB3D}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{35079D1C-422A-48FE-B150-23BBAC13BB3D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{35079D1C-422A-48FE-B150-23BBAC13BB3D}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{35079D1C-422A-48FE-B150-23BBAC13BB3D}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{35079D1C-422A-48FE-B150-23BBAC13BB3D}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {242C9AAD-E4C9-433F-B032-AF674C1AC1C1} | ||
EndGlobalSection | ||
EndGlobal |
16 changes: 16 additions & 0 deletions
16
...arted/Docker/Debian/Convert Excel to PDF/Convert-Excel-to-PDF/Convert-Excel-to-PDF.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,16 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>netcoreapp3.1</TargetFramework> | ||
<RootNamespace>Convert_Excel_to_PDF</RootNamespace> | ||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.17.2" /> | ||
<PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="2.88.5" /> | ||
<PackageReference Include="Syncfusion.XlsIORenderer.Net.Core" Version="23.1.36" /> | ||
</ItemGroup> | ||
|
||
</Project> |
6 changes: 6 additions & 0 deletions
6
.../Docker/Debian/Convert Excel to PDF/Convert-Excel-to-PDF/Convert-Excel-to-PDF.csproj.user
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"?> | ||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<ActiveDebugProfile>Docker</ActiveDebugProfile> | ||
</PropertyGroup> | ||
</Project> |
Binary file added
BIN
+12 KB
...g Started/Docker/Debian/Convert Excel to PDF/Convert-Excel-to-PDF/Data/InputTemplate.xlsx
Binary file not shown.
21 changes: 21 additions & 0 deletions
21
Getting Started/Docker/Debian/Convert Excel to PDF/Convert-Excel-to-PDF/Dockerfile
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,21 @@ | ||
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging. | ||
|
||
FROM mcr.microsoft.com/dotnet/aspnet:3.1-buster-slim AS base | ||
RUN apt-get update -y && apt-get install fontconfig -y | ||
WORKDIR /app | ||
|
||
FROM mcr.microsoft.com/dotnet/sdk:3.1-buster-slim AS build | ||
WORKDIR /src | ||
COPY ["Convert-Excel-to-PDF.csproj", "."] | ||
RUN dotnet restore "./Convert-Excel-to-PDF.csproj" | ||
COPY . . | ||
WORKDIR "/src/." | ||
RUN dotnet build "Convert-Excel-to-PDF.csproj" -c Release -o /app/build | ||
|
||
FROM build AS publish | ||
RUN dotnet publish "Convert-Excel-to-PDF.csproj" -c Release -o /app/publish | ||
|
||
FROM base AS final | ||
WORKDIR /app | ||
COPY --from=publish /app/publish . | ||
ENTRYPOINT ["dotnet", "Convert-Excel-to-PDF.dll"] |
33 changes: 33 additions & 0 deletions
33
Getting Started/Docker/Debian/Convert Excel to PDF/Convert-Excel-to-PDF/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,33 @@ | ||
using Syncfusion.Pdf; | ||
using Syncfusion.XlsIO; | ||
using System; | ||
using System.IO; | ||
using Syncfusion.XlsIORenderer; | ||
using static System.Net.Mime.MediaTypeNames; | ||
|
||
namespace Convert_Excel_to_PDF | ||
{ | ||
internal class Program | ||
{ | ||
static void Main(string[] args) | ||
{ | ||
using (ExcelEngine excelEngine = new ExcelEngine()) | ||
{ | ||
IApplication application = excelEngine.Excel; | ||
application.DefaultVersion = ExcelVersion.Xlsx; | ||
FileStream excelStream = new FileStream("Data/InputTemplate.xlsx", FileMode.Open, FileAccess.Read); | ||
IWorkbook workbook = application.Workbooks.Open(excelStream); | ||
|
||
//Initialize XlsIO renderer. | ||
XlsIORenderer renderer = new XlsIORenderer(); | ||
|
||
//Convert Excel document into PDF document | ||
PdfDocument pdfDocument = renderer.ConvertToPDF(workbook); | ||
|
||
//Create the FileStream to save the converted PDF. | ||
FileStream pdfStream = new FileStream("Output.pdf", FileMode.Create, FileAccess.ReadWrite); | ||
pdfDocument.Save(pdfStream); | ||
} | ||
} | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
...ed/Docker/Debian/Convert Excel to PDF/Convert-Excel-to-PDF/Properties/launchSettings.json
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,10 @@ | ||
{ | ||
"profiles": { | ||
"Convert-Excel-to-PDF": { | ||
"commandName": "Project" | ||
}, | ||
"Docker": { | ||
"commandName": "Docker" | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
Getting Started/Docker/RHEL/Convert Excel to PDF/Convert-Excel-to-PDF.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.5.33516.290 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Convert-Excel-to-PDF", "Convert-Excel-to-PDF\Convert-Excel-to-PDF.csproj", "{AAEA8DE9-60DE-4C94-84C6-B326724AE0BD}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{AAEA8DE9-60DE-4C94-84C6-B326724AE0BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{AAEA8DE9-60DE-4C94-84C6-B326724AE0BD}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{AAEA8DE9-60DE-4C94-84C6-B326724AE0BD}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{AAEA8DE9-60DE-4C94-84C6-B326724AE0BD}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {BB0DECF5-AE91-4839-ADEC-E016FCB408D9} | ||
EndGlobalSection | ||
EndGlobal |
16 changes: 16 additions & 0 deletions
16
...Started/Docker/RHEL/Convert Excel to PDF/Convert-Excel-to-PDF/Convert-Excel-to-PDF.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,16 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>netcoreapp3.1</TargetFramework> | ||
<RootNamespace>Convert_Excel_to_PDF</RootNamespace> | ||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.17.2" /> | ||
<PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="2.88.5" /> | ||
<PackageReference Include="Syncfusion.XlsIORenderer.Net.Core" Version="23.1.36" /> | ||
</ItemGroup> | ||
|
||
</Project> |
6 changes: 6 additions & 0 deletions
6
...ed/Docker/RHEL/Convert Excel to PDF/Convert-Excel-to-PDF/Convert-Excel-to-PDF.csproj.user
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"?> | ||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<ActiveDebugProfile>Docker</ActiveDebugProfile> | ||
</PropertyGroup> | ||
</Project> |
Binary file added
BIN
+12 KB
...ing Started/Docker/RHEL/Convert Excel to PDF/Convert-Excel-to-PDF/Data/InputTemplate.xlsx
Binary file not shown.
22 changes: 22 additions & 0 deletions
22
Getting Started/Docker/RHEL/Convert Excel to PDF/Convert-Excel-to-PDF/Dockerfile
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,22 @@ | ||
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging. | ||
|
||
FROM registry.access.redhat.com/ubi8/dotnet-31-runtime AS base | ||
USER root | ||
RUN yum -y install fontconfig --disablerepo=epel | ||
WORKDIR / | ||
|
||
FROM registry.access.redhat.com/ubi8/dotnet-31 AS build | ||
WORKDIR /src | ||
COPY ["Convert-Excel-to-PDF.csproj", ""] | ||
RUN dotnet restore "./Convert-Excel-to-PDF.csproj" | ||
COPY . . | ||
WORKDIR "/src/." | ||
RUN dotnet build "Convert-Excel-to-PDF.csproj" -c Release -o /app/build | ||
|
||
FROM build AS publish | ||
RUN dotnet publish "Convert-Excel-to-PDF.csproj" -c Release -o /app/publish | ||
|
||
FROM base AS final | ||
WORKDIR /app | ||
COPY --from=publish /app/publish . | ||
ENTRYPOINT ["dotnet", "Convert-Excel-to-PDF.dll"] |
33 changes: 33 additions & 0 deletions
33
Getting Started/Docker/RHEL/Convert Excel to PDF/Convert-Excel-to-PDF/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,33 @@ | ||
using Syncfusion.Pdf; | ||
using Syncfusion.XlsIO; | ||
using System; | ||
using System.IO; | ||
using Syncfusion.XlsIORenderer; | ||
using static System.Net.Mime.MediaTypeNames; | ||
|
||
namespace Convert_Excel_to_PDF | ||
{ | ||
internal class Program | ||
{ | ||
static void Main(string[] args) | ||
{ | ||
using (ExcelEngine excelEngine = new ExcelEngine()) | ||
{ | ||
IApplication application = excelEngine.Excel; | ||
application.DefaultVersion = ExcelVersion.Xlsx; | ||
FileStream excelStream = new FileStream("Data/InputTemplate.xlsx", FileMode.Open, FileAccess.Read); | ||
IWorkbook workbook = application.Workbooks.Open(excelStream); | ||
|
||
//Initialize XlsIO renderer. | ||
XlsIORenderer renderer = new XlsIORenderer(); | ||
|
||
//Convert Excel document into PDF document | ||
PdfDocument pdfDocument = renderer.ConvertToPDF(workbook); | ||
|
||
//Create the FileStream to save the converted PDF. | ||
FileStream pdfStream = new FileStream("Output.pdf", FileMode.Create, FileAccess.ReadWrite); | ||
pdfDocument.Save(pdfStream); | ||
} | ||
} | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
...rted/Docker/RHEL/Convert Excel to PDF/Convert-Excel-to-PDF/Properties/launchSettings.json
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,10 @@ | ||
{ | ||
"profiles": { | ||
"Convert-Excel-to-PDF": { | ||
"commandName": "Project" | ||
}, | ||
"Docker": { | ||
"commandName": "Docker" | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
Getting Started/Docker/Ubuntu/Convert Excel to PDF/Convert-Excel-to-PDF.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.5.33516.290 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Convert-Excel-to-PDF", "Convert-Excel-to-PDF\Convert-Excel-to-PDF.csproj", "{675724F6-6A41-4466-B452-5760018C4FEA}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{675724F6-6A41-4466-B452-5760018C4FEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{675724F6-6A41-4466-B452-5760018C4FEA}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{675724F6-6A41-4466-B452-5760018C4FEA}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{675724F6-6A41-4466-B452-5760018C4FEA}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {73025860-39DA-4DF6-8CC3-D9D7A29408E2} | ||
EndGlobalSection | ||
EndGlobal |
Oops, something went wrong.