Created
June 25, 2024 22:56
-
-
Save conholdate-gists/e4ba40ba345c65ec675298a008abbdf5 to your computer and use it in GitHub Desktop.
Convert Word DOCX Document to Latex in C# .NET
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
// Initialize a MemoryStream class object | |
MemoryStream stream = new MemoryStream(); | |
// Load the input Word document | |
Aspose.Words.Document document = new Aspose.Words.Document("input.docx"); | |
// Write the intermediate file to a stream | |
document.Save(stream , Aspose.Words.SaveFormat.Pdf); | |
// Load the intermediate PDF file | |
Aspose.Pdf.Document doc = new Aspose.Pdf.Document(stream); | |
// Instantiate LaTex option | |
TeXSaveOptions saveOptions = new TeXSaveOptions(); | |
// Save the output LaTex file | |
doc.Save("WordToLaTeX.tex", saveOptions); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment