Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
Initial Commit of application
  • Loading branch information
tobor88 committed Jan 29, 2021
1 parent a7208d8 commit 6db18f8
Show file tree
Hide file tree
Showing 84 changed files with 35,446 additions and 0 deletions.
Binary file not shown.
Empty file.
Binary file not shown.
25 changes: 25 additions & 0 deletions Convert PDF to DOCX/Convert PDF to DOCX.sln
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 16
VisualStudioVersion = 16.0.29613.14
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Convert PDF to DOCX", "Convert PDF to DOCX\Convert PDF to DOCX.csproj", "{902B7C06-8323-4F7A-8FB4-52CD6FDB7ACB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{902B7C06-8323-4F7A-8FB4-52CD6FDB7ACB}.Debug|Any CPU.ActiveCfg = Release|Any CPU
{902B7C06-8323-4F7A-8FB4-52CD6FDB7ACB}.Debug|Any CPU.Build.0 = Release|Any CPU
{902B7C06-8323-4F7A-8FB4-52CD6FDB7ACB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{902B7C06-8323-4F7A-8FB4-52CD6FDB7ACB}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {51B65407-F8D9-412C-AD33-93D36F61D5EB}
EndGlobalSection
EndGlobal
22 changes: 22 additions & 0 deletions Convert PDF to DOCX/Convert PDF to DOCX/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Syncfusion.Compression.Base" publicKeyToken="3d67ed1f87d44c89" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-18.4460.0.39" newVersion="18.4460.0.39" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Syncfusion.OfficeChart.Base" publicKeyToken="3d67ed1f87d44c89" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-18.4460.0.39" newVersion="18.4460.0.39" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Syncfusion.Licensing" publicKeyToken="632609b4d040f6b4" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-18.4460.0.39" newVersion="18.4460.0.39" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
103 changes: 103 additions & 0 deletions Convert PDF to DOCX/Convert PDF to DOCX/Convert PDF to DOCX.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<?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>{902B7C06-8323-4F7A-8FB4-52CD6FDB7ACB}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>Convert_PDF_to_DOCX</RootNamespace>
<AssemblyName>Convert PDF to DOCX</AssemblyName>
<TargetFrameworkVersion>v4.8</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>
<PropertyGroup>
<ApplicationIcon>favicon.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<SignManifests>true</SignManifests>
</PropertyGroup>
<PropertyGroup>
<ManifestCertificateThumbprint>05A05CE246F70EF4B375FA16508A6BF73AD2E5F6</ManifestCertificateThumbprint>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Office.Interop.Word, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Office.Interop.Word.15.0.4797.1003\lib\net20\Microsoft.Office.Interop.Word.dll</HintPath>
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="SautinSoft.PdfFocus, Version=7.8.1.29, Culture=neutral, PublicKeyToken=0b79b934109b3e9e, processorArchitecture=MSIL">
<HintPath>..\packages\sautinsoft.pdffocus.7.8.1.29\lib\net48\SautinSoft.PdfFocus.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.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<Content Include="favicon.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
106 changes: 106 additions & 0 deletions Convert PDF to DOCX/Convert PDF to DOCX/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

55 changes: 55 additions & 0 deletions Convert PDF to DOCX/Convert PDF to DOCX/Form1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
using System;
using System.Linq;
using System.Windows.Forms;
using Word = Microsoft.Office.Interop.Word;

namespace Convert_PDF_to_DOCX
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void TextBox1_DragEnter(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop))
e.Effect = DragDropEffects.All;
else

e.Effect = DragDropEffects.None;
}

private void TextBox1_DragDrop(object sender, DragEventArgs e)
{
string[] files = e.Data.GetData(DataFormats.FileDrop) as string[]; // get all files droppeds
if (files != null && files.Any())
textBox1.Text = files.First(); //select the first one
}

private void TextBox1_DragOver(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop))
e.Effect = DragDropEffects.Link;
else
e.Effect = DragDropEffects.None;
}

private void Button1_Click(object sender, EventArgs e)
{
string pdfFile = textBox1.Text.ToString();
string wordFile = pdfFile.ToString().Replace(".pdf", ".docx");

if (pdfFile.ToString().Contains(".pdf"))
{
var wordApp = new Word.Application();
wordApp.Visible = true;
var txt = wordApp.Documents.Open(pdfFile);

wordApp.Documents[1].SaveAs(wordFile);
wordApp.Documents[1].Close();
}
}
}
}
Loading

0 comments on commit 6db18f8

Please sign in to comment.