我使用PDFFocus.net dll将PDF文件转换为Word文件。但对于我的系统,我需要.docx文件。我尝试了不同的方法。有一些库可用,但这些都不是免费的。这是我的pdf到doc转换代码。
Using System;
Using System.Collections.Generic;
Using System.Linq;
Using System.Text;
Using System.Threading.Tasks;
Using iTextSharp.text;
Using iTextSharp.text.pdf;
namespace ConsoleApplication
{
class Program
{
static void main(String[] args)
{
SautinSoft.PdfFocus f=new SautinSoft.PdfFocus();
f.OpenPdf(@"E:\input.pdf");
t.ToWord(@"E:\input.doc");
}
}
}
这个工作顺利完成。然后我尝试使用以下代码将.doc转换为.docx。但是它给了我一个错误。
//Open a Document.
Document doc=new Document("input.doc");
//Save Document.
doc.save("output.docx");
请问有人能帮我吗?
.doc
文件并保存为.docx
文件。 - marc_s