Last active
November 24, 2024 14:41
Convert Word DOC to EPUB using C#. For more details: https://kb.aspose.com/words/net/convert-word-doc-to-epub-using-csharp/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Aspose.Words; | |
using Aspose.Words.Saving; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
License lic = new License(); | |
lic.SetLicense("license.lic"); | |
Document doc = new Document("SampleFile.docx"); | |
HtmlSaveOptions options = new HtmlSaveOptions | |
{ | |
DocumentSplitCriteria = DocumentSplitCriteria.HeadingParagraph, | |
SaveFormat = SaveFormat.Epub, | |
ExportDocumentProperties = true | |
}; | |
doc.Save("EPUB/OutputEbook.epub", options); | |
System.Console.WriteLine("DOCX to EPUB converted successfully"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment