PdfOperator/FrmPdfToWord.cs
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using Spire.Pdf;
using System;
using System.Diagnostics;
using System.IO;
using System.Windows.Forms;
namespace PdfOperator
{
public partial class FrmPdfToWord : Form
{
public FrmPdfToWord()
{
InitializeComponent();
}
/// <summary>
/// 打开PDF
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnOpenfile_Click(object sender, EventArgs e)
{
OpenFileDialog fileDialog = new OpenFileDialog();
fileDialog.Title = "打开PDF";
fileDialog.Filter = "pdf文件|*.pdf";
if (fileDialog.ShowDialog() == DialogResult.OK)
{
string name = fileDialog.FileName;
txtFilePath.Text = name;
}
}
/// <summary>
/// 选择保存路径
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnSavePath_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(txtFilePath.Text))
{
MessageBox.Show("请先选择要操作的pdf!");
return;
}
SaveFileDialog saveFile = new SaveFileDialog();
saveFile.Title = "选择保存路径";
saveFile.Filter = "word文件|*.doc;*.docx";
saveFile.DefaultExt = ".docx";
saveFile.FileName = "转为word的文档.docx";
if (saveFile.ShowDialog() == DialogResult.OK)
{
txtSavePath.Text = saveFile.FileName;
}
}
/// <summary>
/// 开始转换
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。