我需要一个接受Doc,Docx和PDF并将其转换为RTF的应用程序。
转换是一种方式,我不需要转换回Doc或PDF。
有没有人这样做过,你能推荐一个图片吗?我知道有aspose,但这是昂贵的方式和许可证是每年,所以这对我碰巧工作的公司不起作用。
我可以为每种文件类型使用多个库,如果这就是它。
提前致谢
答案 0 :(得分:1)
Telerik有一个很好的库可以做到这一点。他们实际上有一个看起来像Microsoft Word的整个编辑器。它可以打开多种文件格式,并且可以本地保存为RTF(虽然它可以保存为PDF,DOCX等)。我不确定的一件事是打开PDF并保存为RTF。我不确定Telerik库是否可以做到这一点。
这是图书馆的链接: http://www.telerik.com/products/wpf/richtextbox.aspx
对于PDF到RTF库,您可以使用: http://www.sautinsoft.com/products/pdf-focus/index.php
答案 1 :(得分:1)
GroupDocs.Conversion Cloud是一种REST API,可将所有常见文件格式从on格式可靠且轻松地转换为另一种格式。它的免费定价计划每月提供50个免费信用。
以下是默认存储中从PDF到RTF的示例代码:
// Get App Key and App SID from https://dashboard.groupdocs.cloud/
var configuration = new GroupDocs.Conversion.Cloud.Sdk.Client.Configuration(MyAppSid, MyAppKey);
var apiInstance = new ConvertApi(configuration);
try
{
// convert settings
var settings = new GroupDocs.Conversion.Cloud.Sdk.Model.ConvertSettings
{
StorageName = null,
FilePath = "02_pages.pdf",
Format = "rtf",
ConvertOptions = new RtfConvertOptions(),
OutputPath = "02_pages.rtf"
};
// convert to specified format
List<StoredConvertedResult> response = apiInstance.ConvertDocument(new ConvertDocumentRequest(settings));
Console.WriteLine("Document converted successfully: " + response[0].Url);
}
catch (Exception e)
{
Console.WriteLine("Exception when calling ConvertApi.QuickConvert: " + e.Message);
}
我是aspose的开发人员。