这个我觉得功能确实还是比较强大,带水印文字都可以转出来
带图片水印的也能转出来
先添加引用Spire.Pdf.dll
代码超级简单:
using Spire.Pdf;
namespace WinFormsApp1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
PDF2WORD("test.pdf", "test.docx");
MessageBox.Show("OK");
}
void PDF2WORD(string SPdffilename, string DesPdffilename)
{
PdfDocument doc = new PdfDocument();
doc.LoadFromFile(SPdffilename);
//保存文件
doc.SaveToFile(DesPdffilename, FileFormat.DOCX);
doc.Close();
}
}
}
我查了一下,Spire.Pdf似乎是国产,真心不错,原来的时候都是用itextcharp.dll,绝大多数功能真是非常强大,但我真不知道怎么把PDF转成WORD,有了这个方法,实在是太方便了!