Aspose.TeX.Drawing
26.4.0
Prefix Reserved
dotnet add package Aspose.TeX.Drawing --version 26.4.0
NuGet\Install-Package Aspose.TeX.Drawing -Version 26.4.0
<PackageReference Include="Aspose.TeX.Drawing" Version="26.4.0" />
<PackageVersion Include="Aspose.TeX.Drawing" Version="26.4.0" />
<PackageReference Include="Aspose.TeX.Drawing" />
paket add Aspose.TeX.Drawing --version 26.4.0
#r "nuget: Aspose.TeX.Drawing, 26.4.0"
#:package Aspose.TeX.Drawing@26.4.0
#addin nuget:?package=Aspose.TeX.Drawing&version=26.4.0
#tool nuget:?package=Aspose.TeX.Drawing&version=26.4.0
Product Page | Docs | API Reference | Examples | Blog | Releases | Support | Temporary License
Aspose.TeX for .NET is a powerful library for typesetting TeX/LaTeX files and converting them to various output formats. It enables C#, VB.NET, and ASP.NET developers to create, process, and render LaTeX documents without installing any third-party TeX distribution.
Key Features
LaTeX Conversion
Convert LaTeX files to multiple output formats:
- PDF — high-quality typeset documents
- XPS — XML Paper Specification format
- SVG — scalable vector graphics
- PNG, JPEG, TIFF, BMP — raster image formats
Math Formula Rendering
Render LaTeX math formulas as standalone images:
- Output to PNG (with configurable resolution) and SVG
- Custom preamble support for math packages (
amsmath,amsfonts,amssymb) - Configurable text color, background color, and scale
LaTeX Graphics
- Include external graphics via
\includegraphics(PNG, EPS, PDF) - Embed graphics directly using Base64 encoding
LaTeX File Repair
- Validate and repair incomplete or broken LaTeX files
- Automatically add missing preamble structures (
\documentclass,\begin{document}, etc.) - Generate validation reports
Custom TeX Format
- Create and use custom TeX format files
- Support for ObjectTeX, ObjectLaTeX, and Plain TeX configurations
Supported File Formats
| Format | Input | Output |
|---|---|---|
| Plain TeX (.tex) | Yes | Yes |
| LaTeX (.ltx, .tex) | Yes | Yes |
| — | Yes | |
| XPS | Yes | Yes |
| SVG | — | Yes |
| PNG | — | Yes |
| JPEG | — | Yes |
| TIFF | — | Yes |
| BMP | — | Yes |
Installation
Package Manager Console:
Install-Package Aspose.TeX
.NET CLI:
dotnet add package Aspose.TeX
PackageReference:
<PackageReference Include="Aspose.TeX" Version="*" />
Code Examples
Convert LaTeX to PDF
using Aspose.TeX;
using Aspose.TeX.IO;
using Aspose.TeX.Presentation.Pdf;
TeXOptions options = TeXOptions.ConsoleAppOptions(TeXConfig.ObjectLaTeX);
options.InputWorkingDirectory = new InputFileSystemDirectory("input");
options.OutputWorkingDirectory = new OutputFileSystemDirectory("output");
options.SaveOptions = new PdfSaveOptions();
new TeXJob("document.tex", new PdfDevice(), options).Run();
Render LaTeX Math Formula to PNG
using Aspose.TeX.Features;
using System.Drawing;
using System.IO;
PngMathRendererOptions options = new PngMathRendererOptions
{
Resolution = 300,
Scale = 1000,
TextColor = Color.Black,
BackgroundColor = Color.White
};
PngMathRenderer renderer = new PngMathRenderer();
using (Stream stream = File.Create("formula.png"))
{
renderer.Render(@"\int_{0}^{\infty} e^{-x^2} dx = \frac{\sqrt{\pi}}{2}", stream, options);
}
Convert LaTeX to SVG
using Aspose.TeX;
using Aspose.TeX.IO;
using Aspose.TeX.Presentation.Svg;
TeXOptions options = TeXOptions.ConsoleAppOptions(TeXConfig.ObjectLaTeX);
options.InputWorkingDirectory = new InputFileSystemDirectory("input");
options.OutputWorkingDirectory = new OutputFileSystemDirectory("output");
options.SaveOptions = new SvgSaveOptions();
new TeXJob("document.tex", new SvgDevice(), options).Run();
Repair a Broken LaTeX File
using Aspose.TeX.Features;
using Aspose.TeX.IO;
LaTeXRepairerOptions options = new LaTeXRepairerOptions();
options.InputWorkingDirectory = new InputFileSystemDirectory("input");
options.OutputWorkingDirectory = new OutputFileSystemDirectory("output");
new LaTeXRepairer("broken.tex", options).Run();
// Output: broken-fixed.tex (repaired file) + broken.log (validation report)
Licensing
Aspose.TeX for .NET works in evaluation mode without a license, adding watermarks to the output. To remove evaluation limitations, apply a license before processing:
Aspose.TeX.License license = new Aspose.TeX.License();
license.SetLicense("Aspose.TeX.lic");
Get a temporary license for full-featured evaluation without watermarks.
Platform Support
| Platform | Versions |
|---|---|
| .NET Framework | 4.0 and higher |
| .NET Standard | 2.0 |
| .NET | 6.0, 7.0 |
Supported OS: Windows, Linux, macOS (any platform supporting .NET Standard 2.0+)
Resources
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- System.Text.Encoding.CodePages (>= 5.0.0)
-
net7.0
- System.Text.Encoding.CodePages (>= 7.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 26.4.0 | 87 | 4/25/2026 |
