Convert TeX and LaTeX
TeX converter API Solution for Java.
Aspose.TeX is an API to the Object TeX system. For details on TeX, refer to Introduction to TeX . Developers can easily convert TeX and LaTeX to PDF, XPS, PNG, JPG, BMP and TIFF formats by integrating the API for Java. Below is a code example that programmers can enhance and integrate into LaTeX solutions.
The API solution for Java here lets you convert TeX and LaTeX files programmatically, but you may find it useful to see and try cross-platform Converters developed using the .NET version of the API. Here you can also find applications to create and edit TeX files, tables, graphics, to merge multiple TeX files into one PDF file, etc.
Convert LaTeX to Images, XPS, PDF, SVG in Java.
The API supports BMP, JPEG, PDF, SVG, TIFF, XPS, and PNG as output formats. To convert TeX files to Images, PDF, XPS, or SVG, follow next steps:
- Instantiate the TeXOptions class.
- Specify the file system working directory for the output/input using the setOutputWorkingDirectory() / setInputWorkingDirectory() methods.
- Initialize save options using the BmpSaveOptions , PngSaveOptions , TiffSaveOptions JpegSaveOptions or PdfSaveOptions , SvgSaveOptions , or XpsSaveOptions class. The last class is the default.
- Instantiate the TeXJob() class, passing the appropriate output device ImageDevice , PdfDevice , SvgDevice , or XpsDevice as an argument, and run the conversion using the run() method.
Aspose.TeX for Java works well in any development environment that supports Java, but the following requirements are strongly recommended:
- Microsoft Windows desktop (7, 8, 10).
- Linux systems (Ubuntu-16.04 or later).
- Mac OS X.
- J2SE 8.0 (1.8) or above (for example Java 10) Java Version.
// Create conversion options for Object LaTeX format on Object TeX engine extension.
TeXOptions options = TeXOptions.consoleAppOptions(TeXConfig.objectLaTeX());
// Specify the input working directory if needed.
// It is required when the main input has dependencies (e.g. images).
options.setInputWorkingDirectory(new InputFileSystemDirectory(Utils.getInputDirectory()));
// Specify the file system working directory for the output.
options.setOutputWorkingDirectory(new OutputFileSystemDirectory(Utils.getOutputDirectory()));
// Initialize the options for saving in PDF format.
options.setSaveOptions(new PdfSaveOptions());
// Run TeX to PDF conversion.
new TeXJob(Utils.getInputDirectory() + "hello-world.tex", new PdfDevice(), options).run();
Support and Learning Resources
- Learning Resources
- Documentation
- Source Code
- API References
- Product Support
- Free Support
- Paid Support
- Blog
- Release Notes
- Why Aspose.TeX for Java?
- Customers List
- Success Stories