Convert PDF to Word in Objective-C, Kotlin, and C#

PDFs and Word documents are widely used in everyday business. When you need to make a PDF file editable or text searchable, you may want to convert it to a Word document. In this article, I'll provide a solution for how to convert PDF to Word using ComPDFKit Conversion SDK. 

How to Convert?

Objective-C

// Get the path of the PDF file.

NSString *pdfPath = @"...";

// Get the path to the Word file.

NSString *outputPath = @"...";



CPDFConverterWord *converter = [[[CPDFConverterWord alloc] initWithURL:[NSURL fileURLWithPath:pdfPath] password:nil] autorelease];

[converter convertToFilePath:outputPath pageIndexs:nil options:nil];

Kotlin

val cPDFConvert = CPDFConverterWord(context, uri, "")



val params = CPDFConvertWordOptions().apply {

     imgPixel = ImgPixel.IMG_300

     ...

}



val result: ConvertError = cPDFConvert.convert(outputDir, outputfilename, params, pageArrays, 

onHandle = onHandleCal, 

onProgress = onProgressCal, 

onPost = onPostCal)

C#

string resPath = "***";

string inputFilePath = "***";

string outputFolderPath = "***";

string outputFileName = "***";

OnProgress getPageIndex = null;



CPDFConverter.Init(resPath);

CPDFConverterWord converter = new CPDFConverterWord(inputFilePath);



int pageCount = converter.GetPagesCount();

int[] pageArray = new int[pageCount];

for (int i = 0; i < pageArray.Length; i++)

{

    pageArray[i] = i + 1;

}



getPageIndex += GetPageIndex;

CPDFConvertWordOptions options = new CPDFConvertWordOptions();

converter.Convert(outputFolderPath, outputFileName, options, pageArray, getPageIndex);

Conclusion

You can get a wide variety of benefits by using ComPDFKit Conversion SDK to convert your PDF files to Word documents.

- Process files of any size, even files with 1000+ pages, without any problem.

- No need to compromise on speed to get the highest quality.

- Allow batch conversion.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
中文名: Objective-C基础教程 作者: Mark Dalrymple Scott Knaster译者: 高朝勤 杨越 刘霞图书 分类: 软件 资源格式: PDF 版本: 扫描版 出版社: 人民邮电出版社 书号: ISBN: 9787115208774 发行时间: 2009年08月 地区: 大陆 语言: 简体中文 简介: 内容简介 Objective-C是扩展C的面向对象编程语言,也是iPhone开发用到的主要语言。本书结合理论知识与示例程序,全面而系统地讲述Objective-C编程的相关内容,包括Objective-C在C的基础上引入的特性和Cocoa工具包的功能及其中的框架,以及继承、复合、源文件组织等众多重要的面向对象编程技术。附录中还介绍了如何从其他语言过渡到Objective-C。   本书适合各类开发人员阅读。 内容截图 目录: 第1章 启程.1 1.1 预备知识1 1.2 历史背景1 1.3 内容简介2 1.4 小结3 第2章 对C的扩展4 2.1 最简单的Objective-C程序4 2.2 解构HelloObjective-C程序7 2.2.1 #import7 2.2.2 NSLog()和@"字符串"8 2.3 布尔类型10 2.3.1 BOOL强大的实用功能11 2.3.2 比较13 2.4 小结14 第3章 面向对象编程基础知识15 3.1 间接15 3.1.1 变量与间接16 3.1.2 使用文件名的间接18 3.2 在面向对象的编程中使用间接24 3.2.1 过程式编程24 3.2.2 实现面向对象编程29 3.3 学习有关的术语33 3.4 Objective-C中的OOP34 3.4.1 @interface部分34 3.4.2 @implementation部分38 3.4.3 实例化对象40 3.4.4 扩展Shapes-Object41 3.5 小结43 第4章 继承45 4.1 为何使用继承45 4.2 继承语法48 4.3 继承的工作机制51 4.3.1 方法调度51 4.3.2 实例变量53 4.4 重写方法55 4.5 小结57 第5章 复合58 5.1 什么是复合58 5.1.1 Car程序58 5.1.2 自定义NSLog()59 5.2 存取方法62 5.2.1 设置发动机的属性64 5.2.2 设置轮胎的属性64 5.2.3 跟踪汽车的变化66 5.3 扩展CarParts程序67 5.4 复合还是继承68 5.5 小结69 第6章 源文件组织70 6.1 拆分接口和实现部分70 6.2 拆分Car程序73 6.3 使用跨文件依赖关系75 6.3.1 重新编译须知75 6.3.2 让汽车开动77 6.3.3 导入和继承79 6.4 小结80 第7章 深入了解Xcode82
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值