資源簡介
c#寫的pdf轉word程序源碼項目,基于的環境是.net 4.0;

代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Linq;
using?System.Text;
using?System.Windows.Forms;
using?System.IO;
using?Spire.Pdf;
namespace?PDF2word
{
????public?partial?class?Form1?:?Form
????{
????????protected?string?fName;
????????public?Form1()
????????{
????????????InitializeComponent();
????????}
????????private?void?button1_Click(object?sender?EventArgs?e)
????????{
????????????PdfDocument?doc?=?new?PdfDocument();
????????????doc.LoadFromFile(fName);
????????????string?savePath?=?Path.GetDirectoryName(fName);
????????????string?saveName?=?Path.GetFileNameWithoutExtension(fName)?+?“.docx“;
????????????string?saveFile?=?Path.Combine(savePath?saveName);
????????????this.label2.Text?=?“開始轉換。。。。“;
????????????doc.SaveToFile(saveFile?FileFormat.DOC);
????????????System.Diagnostics.Process.Start(saveFile);
????????????this.label2.Text?=?“轉換完成“;
????????}
????????private?void?button2_Click(object?sender?EventArgs?e)
????????{
????????????OpenFileDialog?openFileDialog?=?new?OpenFileDialog();
????????????openFileDialog.InitialDirectory?=?“c:\\“;//注意這里寫路徑時要用c:\\而不是c:\
????????????openFileDialog.Filter?=?“文本文件|*.pdf“;
????????????openFileDialog.RestoreDirectory?=?true;
????????????openFileDialog.FilterIndex?=?1;
????????????if?(openFileDialog.ShowDialog()?==?DialogResult.OK)
????????????{
????????????????fName?=?openFileDialog.FileName;
????????????????this.label1.Text?=?fName;
????????????}
????????}
????}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????144??2018-12-01?21:17??pdf2word\PDF2word\PDF2word\app.config
?????文件???????9728??2018-12-01?22:07??pdf2word\PDF2word\PDF2word\bin\Debug\PDF2word.exe
?????文件????????144??2018-12-01?21:17??pdf2word\PDF2word\PDF2word\bin\Debug\PDF2word.exe.config
?????文件??????24064??2018-12-01?22:07??pdf2word\PDF2word\PDF2word\bin\Debug\PDF2word.pdb
?????文件??????11600??2018-12-02?14:32??pdf2word\PDF2word\PDF2word\bin\Debug\PDF2word.vshost.exe
?????文件????????144??2018-12-01?21:17??pdf2word\PDF2word\PDF2word\bin\Debug\PDF2word.vshost.exe.config
?????文件????????490??2010-03-17?22:39??pdf2word\PDF2word\PDF2word\bin\Debug\PDF2word.vshost.exe.manifest
?????文件??????45056??2018-12-01?21:35??pdf2word\PDF2word\PDF2word\bin\Debug\Spire.License.dll
?????文件???12111872??2018-08-28?11:13??pdf2word\PDF2word\PDF2word\bin\Debug\Spire.Pdf.dll
?????文件???????1634??2018-12-01?22:07??pdf2word\PDF2word\PDF2word\Form1.cs
?????文件???????3733??2018-12-01?22:07??pdf2word\PDF2word\PDF2word\Form1.Designer.cs
?????文件???????5817??2018-12-01?22:07??pdf2word\PDF2word\PDF2word\Form1.resx
?????文件???????3744??2018-12-02?14:32??pdf2word\PDF2word\PDF2word\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache
?????文件???????6209??2018-12-01?22:07??pdf2word\PDF2word\PDF2word\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache
?????文件????????828??2018-12-02?14:32??pdf2word\PDF2word\PDF2word\obj\x86\Debug\PDF2word.csproj.FileListAbsolute.txt
?????文件????????975??2018-12-01?22:07??pdf2word\PDF2word\PDF2word\obj\x86\Debug\PDF2word.csproj.GenerateResource.Cache
?????文件??????35471??2018-12-01?22:07??pdf2word\PDF2word\PDF2word\obj\x86\Debug\PDF2word.csprojResolveAssemblyReference.cache
?????文件???????9728??2018-12-01?22:07??pdf2word\PDF2word\PDF2word\obj\x86\Debug\PDF2word.exe
?????文件????????180??2018-12-01?22:07??pdf2word\PDF2word\PDF2word\obj\x86\Debug\PDF2word.Form1.resources
?????文件??????24064??2018-12-01?22:07??pdf2word\PDF2word\PDF2word\obj\x86\Debug\PDF2word.pdb
?????文件????????180??2018-12-01?21:51??pdf2word\PDF2word\PDF2word\obj\x86\Debug\PDF2word.Properties.Resources.resources
?????文件???????4608??2018-12-01?22:05??pdf2word\PDF2word\PDF2word\obj\x86\Debug\TempPE\Properties.Resources.Designer.cs.dll
?????文件???????4038??2018-12-01?21:51??pdf2word\PDF2word\PDF2word\PDF2word.csproj
?????文件????????489??2018-12-01?20:53??pdf2word\PDF2word\PDF2word\Program.cs
?????文件???????1348??2018-12-01?20:53??pdf2word\PDF2word\PDF2word\Properties\AssemblyInfo.cs
?????文件???????2856??2018-12-01?21:17??pdf2word\PDF2word\PDF2word\Properties\Resources.Designer.cs
?????文件???????5612??2018-12-01?20:53??pdf2word\PDF2word\PDF2word\Properties\Resources.resx
?????文件???????1108??2018-12-01?21:17??pdf2word\PDF2word\PDF2word\Properties\Settings.Designer.cs
?????文件????????249??2018-12-01?20:53??pdf2word\PDF2word\PDF2word\Properties\Settings.settings
?????文件????????866??2018-12-01?20:53??pdf2word\PDF2word\PDF2word.sln
............此處省略14個文件信息
評論
共有 條評論