Convert PDF to Excel with ComPDFKit

Objective-C

// Get the path of the PDF file.
NSString *pdfPath = @"...";
// Get the path to the Excel file.
NSString *outputPath = @"...";

CPDFConverterExcel *converter = [[[CPDFConverterExcel alloc] initWithURL:[NSURL fileURLWithPath:pdfPath] password:nil] autorelease];
[converter convertToFilePath:outputPath pageIndexs:nil options:nil];

Kotlin

val cPDFConvert = CPDFConverterExcel(context, uri, "")
val params = CPDFConvertExcelOptions()
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);
CPDFConverterExcel converter = new CPDFConverterExcel(inputFilePath);

int pageCount = converter.GetPagesCount();
int[] pageArray = new int[pageCount];
for (int i = 0; i < pageArray.Length; i++)
{
    pageArray[i] = i + 1;
}

getPageIndex += GetPageIndex;
CPDFConvertExcelOptions options = new CPDFConvertExcelOptions();
converter.Convert(outputFolderPath, outputFileName, options, pageArray, getPageIndex);
本作品采用《CC 协议》,转载必须注明作者和本文链接
讨论数量: 0
(= ̄ω ̄=)··· 暂无内容!

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!