Aspose.TeX for .NET provides typesetting capabilities to developers looking to process TeX and LaTeX files in their .NET solutions. Using the API, developers can programmatically generate PDF documents from TeX and LaTeX files and convert these files to XPS documents, JPEG, PNG, BMP, and TIFF raster image formats, as well as SVG vectors. Our API helps end users typeset TeX files and make custom TeX formats.
The .NET typesetting API enables developers to load TeX files from various sources, typeset them, convert them to multiple file formats, export them to ZIP archives, generate customized TeX formats, create mathematical equations in LaTeX, and do more. Aspose.TeX for .NET is a powerful library with easy-to-use features that allow users to automate TeX and LaTeX document processing solutions and conveniently optimize their existing workflows.
Before getting started and installing Aspose.TeX for .NET, please visit the System Requirements page. This page provides the recommended framework, OS, and development environment information. Please ensure compliance with the settings outlined on this page to enjoy a smooth API usage experience.
Please download the MSI installer or the DLLs of the .NET TeX file typesetting library from the downloads section to set up the library. You can also install the library using the NuGet package. The command for the Visual Studio package manager console is provided below:
Aspose.TeX for .NET supports converting TeX files to multiple formats, including PDF and XPS. Developers can export TeX to PDF documents and images within their .NET solutions using the API methods. Converting LaTeX files to raster images is another functionality available to end users. In this section, we will learn how to programmatically convert TeX to PDF and LaTeX to JPG using the .NET typesetting API.
Let’s review the following coding example to learn how to accurately convert TeX to PDF using the .NET library for typesetting.
String dataDir = @"D:\test\"; // Create typesetting options for the default ObjectTeX format. TeXOptions options = TeXOptions.ConsoleAppOptions(TeXConfig.ObjectTeX()); // Specify a file system working directory for input. options.InputWorkingDirectory = new InputFileSystemDirectory(dataDir); // Specify a file system working directory for output. options.OutputWorkingDirectory = new OutputFileSystemDirectory(dataDir); // Specify memory stream as output terminal. options.TerminalOut = new OutputMemoryTerminal(); // Set options for rendering into PDF format. options.SaveOptions = new PdfSaveOptions(); // Run typesetting. new TeXJob("hello-world", new PdfDevice(), options);
Our library supports exporting LaTeX files to images, including PNG and JPG. The following example showcases converting LaTeX to JPG.
// Load the input LaTEX or TEX file byte[] bytes = File.ReadAllBytes("helloworld.ltx"); Stream stream = new MemoryStream(bytes); // Create conversion options for Object LaTeX format on Object TeX engine extension. TeXOptions options = TeXOptions.ConsoleAppOptions(TeXConfig.ObjectLaTeX); // Specify the file system working directory for the output. options.OutputWorkingDirectory = new OutputFileSystemDirectory(dataDir); // Initialize the options for saving in JPG format. options.SaveOptions = new JpegSaveOptions(); // Run LaTeX to JPG conversion. new TeXJob(stream, new ImageDevice(), options).Run();
Please check out more complete coding examples of Aspose.TeX for .NET library on the GitHub examples page. You can view and convert TeX files from anywhere using your mobile devices with our Free Online TeX Viewer and Conversion Apps.
Aspose.TeX for .NET is compatible with multiple frameworks and supports various popular operating systems. Owing to this cross-platform compatibility, developers can build feature-rich typesetting applications that can be easily integrated with the existing software modules. The .NET typesetting API can be used across different development environments for writing optimized application code. Experience platform-independent app development and create PDFs or great-quality raster and vector images using our API.
Processing TeX and LaTeX files is convenient using the Aspose.TeX for .NET library. Our library boasts typesetting ability for TeX files and supports generating PDFs, XPS documents, and images from TeX and LaTeX documents on the .NET platform.
Our API works fast and completes your file loading, processing, and conversion requests in no time.
Yes, we provide coding examples for developers to help them with the initial learning curve. These code samples are available on the GitHub examples page of the .NET library for typesetting and cover various use cases for the library users.
Yes, our API is secure for sensitive data. We ensure the safety and integrity of your data and take all necessary measures to protect your files processed using our products.
Absolutely! The .NET typesetting API is compatible with multiple .NET frameworks and runs smoothly on various operating systems. It does not require additional software installations to typeset TeX files.