Aspose.PDF is an advanced PDF processing API that can easily generate, modify, convert, render, protect and print documents in cross-platform applications. No need to use Adobe Acrobat. Additionally, the API provides compression options, table creation and manipulation, graphics and image functionality, extensive hyperlink functionality, stamp and watermark tasks, extended security controls, and custom font handling. . This article will introduce you how to convert PDF to Doc, Docx in C++.
Aspose API supports popular file format processing and allows exporting or converting various types of documents to fixed layout file formats and most commonly used image/multimedia formats.
The LaTeX file format is a text file format document marked in the LaTeX 2ε derivative of the TeX language, a format derived from the TeX system.
In order to achieve this function, Aspose.Pdf introduced a class called LaTeXSaveOptions, the OutDirectoryPath property is used to save temporary pictures during the conversion process.
Below is the code snippet to convert PDF file to TeX format
C#
// create Document object Aspose.Pdf.Document doc = new Aspose.Pdf.Document(@"d:\pdftest\Input.pdf"); // instantiate LaTex save option LaTeXSaveOptions saveOptions = new LaTeXSaveOptions(); // specify the output directory string pathToOutputDirectory = @"d:\pdftest\"; // set the output directory path for save option object saveOptions.OutDirectoryPath = pathToOutputDirectory; // specify output file name string outFileName = pathToOutputDirectory + "Output.tex"; // save PDF file into LaTex format doc.Save(outFileName, saveOptions);
VB.NET
' create Document object Dim doc As Aspose.Pdf.Document = New Aspose.Pdf.Document("d:\pdftest\Input.pdf") ' instantiate LaTex save option Dim saveOptions As LaTeXSaveOptions = New LaTeXSaveOptions() ' specify the output directory Dim pathToOutputDirectory As String = "d:\pdftest\" ' set the output directory path for save option object saveOptions.OutDirectoryPath = pathToOutputDirectory ' specify output file name Dim outFileName As String = pathToOutputDirectory + "Output.tex" ' save PDF file into LaTex format doc.Save(outFileName, saveOptions)