Windows
ComPDFKit Conversion SDK
Guides

Convert PDF Documents to HTML Documents  

 

string resPath = "***";
string inputFilePath = "***";
string outputFolderPath = "***";
string outputFileName = "***";

CPDFConvertHTMLOptions htmlOptions = new CPDFConvertHTMLOptions();
htmlOptions.PageAndNavigationPaneOpts = PageAndNavigationPaneOptions.SinglePageNavigationByBookmarks;

CPDFConverter.Init(resPath);
CPDFConverterHTML converter = new CPDFConverterHTML(inputFilePath);

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

ConvertError error = ConvertError.ERR_UNKNOWN;
converter.Convert(outputFolderPath, ref outputFileName, htmlOptions, pageArray, ref error, getPorgress);