Skip to content
Merged
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,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 18
VisualStudioVersion = 18.9.12120.119 stable
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Convert-data-as-Excel-from-PDF", "Convert-data-as-Excel-from-PDF\Convert-data-as-Excel-from-PDF.csproj", "{88085F33-AC4F-D6AB-F085-D466B200233D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{88085F33-AC4F-D6AB-F085-D466B200233D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{88085F33-AC4F-D6AB-F085-D466B200233D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{88085F33-AC4F-D6AB-F085-D466B200233D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{88085F33-AC4F-D6AB-F085-D466B200233D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {492422DA-0C62-412E-A5E9-9F85164F6C5E}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>Convert_data_as_Excel_from_PDF</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Syncfusion.SmartDataExtractor.Net.Core" Version="*" />
</ItemGroup>

<ItemGroup>
<None Update="Data\Input.pdf">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Output\.gitkeep">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using Syncfusion.XlsIO;
using Syncfusion.SmartDataExtractor;

//Open the input PDF file as a stream.
using (FileStream stream = new FileStream(Path.GetFullPath(@"Data/Input.pdf"), FileMode.Open, FileAccess.ReadWrite))
{
  //Initialize the Data Extractor.
  DataExtractor extractor = new DataExtractor();
  //Extract data as Excel Document.
  IWorkbook excel = extractor.ExtractDataAsExcel(stream);
  //Save the extracted excel data into an output file.
  excel.SaveAs(Path.GetFullPath(@"Output/Output.xlsx"));
  excel.Close();
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Convert PDF to Excel

The Syncfusion® [Smart Data Extractor](https://www.syncfusion.com/document-sdk/net-pdf-data-extraction) is a .NET library used to extract document structures such as hierarchies, text blocks, images, barcodes, headers, and footers from PDFs and scanned images by analyzing visual layout patterns like lines, boxes, and alignment. It converts the extracted content into an Excel workbook for easy editing, formatting, and sharing.

## Steps to Convert PDF to Excel

Step 1: **Create a new project:** Begin by setting up a new C# Console Application project.

Step 2: **Install the NuGet package:** Add the [Syncfusion.SmartDataExtractor.Net.Core](https://www.nuget.org/packages/Syncfusion.SmartDataExtractor.Net.Core) package to your project from [NuGet.org](https://www.nuget.org/).

Step 3: **Include necessary namespaces:** Add these namespaces in your Program.cs file:

```csharp
using Syncfusion.XlsIO;
using Syncfusion.SmartDataExtractor;

```

Step 4: Add the following code snippet in Program.cs file to extract data from PDF.

```csharp
//Open the input PDF file as a stream.

using (FileStream stream = new FileStream("Input.pdf", FileMode.Open, FileAccess.Read))
{

//Initialize the Data Extractor.
DataExtractor extractor = new DataExtractor();
//Extract data as Excel workbook.
IWorkbook excelWorkbook = extractor.ExtractDataAsExcel(stream);
using MemoryStream saveStream = new MemoryStream();
//Save the extracted Excel data into an output file.
excelWorkbook.SaveAs(saveStream);
excelWorkbook.Close();
}
```
For a complete working example, download it from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Data-Extraction/Smart-Data-Extractor/Convert-data-as-Excel-from-PDF/.NET).

More information about Extract data from PDF can be refer in this [documentation](https://help.syncfusion.com/document-processing/data-extraction/net/conversions/pdf-to-excel#convert-pdf-or-image-to-excel-document) section.
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 18
VisualStudioVersion = 18.9.12120.119 stable
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Convert-data-as-PPTX-from-PDF", "Convert-data-as-PPTX-from-PDF\Convert-data-as-PPTX-from-PDF.csproj", "{88085F33-AC4F-D6AB-F085-D466B200233D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{88085F33-AC4F-D6AB-F085-D466B200233D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{88085F33-AC4F-D6AB-F085-D466B200233D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{88085F33-AC4F-D6AB-F085-D466B200233D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{88085F33-AC4F-D6AB-F085-D466B200233D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {492422DA-0C62-412E-A5E9-9F85164F6C5E}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>Convert_data_as_PPTX_from_PDF</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Syncfusion.SmartDataExtractor.Net.Core" Version="*" />
</ItemGroup>

<ItemGroup>
<None Update="Data\Input.pdf">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Output\.gitkeep">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using Syncfusion.Presentation;
using Syncfusion.SmartDataExtractor;

//Open the input PDF file as a stream.
using (FileStream stream = new FileStream(Path.GetFullPath(@"Data/Input.pdf"), FileMode.Open, FileAccess.ReadWrite))
{
//Initialize the Data Extractor.
DataExtractor extractor = new DataExtractor();
//Extract data as Presentation.
IPresentation pptxDoc = extractor.ExtractDataAsPresentation(stream);
//Save the extracted pptx data into an output file.
pptxDoc.Save(Path.GetFullPath(@"Output/Output.pptx"));
pptxDoc.Close();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Convert PDF to PowerPoint

The Syncfusion® [Smart Data Extractor](https://www.syncfusion.com/document-sdk/net-pdf-data-extraction) is a .NET library used to extract document structures such as hierarchies, text blocks, images, barcodes, headers, and footers from PDFs and scanned images by analyzing visual layout patterns like lines, boxes, and alignment. It converts the extracted content into a PowerPoint presentation for easy editing, formatting, and sharing.

## Steps to Convert PDF to PowerPoint

Step 1: **Create a new project:** Begin by setting up a new C# Console Application project.

Step 2: **Install the NuGet package:** Add the [Syncfusion.SmartDataExtractor.Net.Core](https://www.nuget.org/packages/Syncfusion.SmartDataExtractor.Net.Core) package to your project from [NuGet.org](https://www.nuget.org/).

Step 3: **Include necessary namespaces:** Add these namespaces in your Program.cs file:

```csharp
using Syncfusion.Presentation;
using Syncfusion.SmartDataExtractor;

```

Step 4: Add the following code snippet in Program.cs file to extract data from PDF.

```csharp
//Open the input PDF file as a stream.

using (FileStream stream = new FileStream("Input.pdf", FileMode.Open, FileAccess.Read))
{

//Initialize the Data Extractor.
DataExtractor extractor = new DataExtractor();
//Extract data as Presentation.
IPresentation presentation = extractor.ExtractDataAsPresentation(stream);
using MemoryStream saveStream = new MemoryStream();
//Save the extracted PowerPoint data into an output file.
presentation.Save(saveStream);
presentation.Close();
}
```
For a complete working example, download it from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Data-Extraction/Smart-Data-Extractor/Convert-data-as-PPTX-from-PDF/.NET).

More information about Extract data from PDF can be refer in this [documentation](https://help.syncfusion.com/document-processing/data-extraction/net/conversions/pdf-to-pptx#convert-pdf-or-image-to-pptx-document) section.
Loading