I have 100 PDF files, and I want to convert them to HTML on a per-page basis, with a separate folder for each PDF file containing all the HTML pages. I can’t find such a functionality or setting in Aspose PDF Converter. Can a program do that?
Are you looking for this functionality in the backend Aspose.PDF API, or are in the free web application.
in the backend
You can surely achieve your requirement by using Aspose.PDF for .NET. In order to do that you need to do following:
- Retrieve PDF Pages by Splitting the PDF document
- Convert PDF to HTML and Save the output PDF in specified directory
Below is very basic sample code snippet:
Document doc = new Document(dataDir + "input.pdf");
var pageChunks = SplitIntoSets<Page>(doc.Pages, 2);
foreach(var page in doc.Pages)
{
Document document = new Document();
document.Pages.Add(page);
HtmlSaveOptions saveOptions = new HtmlSaveOptions();
document.Save(dataDir + "output.html", saveOptions);
}