Class TeXLoadOptions

TeXLoadOptions class

Represents options for loading/importing TeX file into PDF document.

public class TeXLoadOptions : LoadOptions


TeXLoadOptions()The default constructor.


DateTime { get; set; }Gets/sets a certain value for date/time primitives like year, month, day and time.
DisableFontLicenseVerifications { get; set; }Gets or sets flag to disable any license restrictions for all fonts while loading the file. When true, allows to execute operations with font that are prohibited by a license of this font, for example allows to embed a font into a PDF document even if license rules disable embedding for this font. By default false.
InputDirectory { get; set; }Gets/sets TeX input directory.
JobName { get; set; }Gets/set the name of the job.
LoadFormat { get; }Represents file format which LoadOptions describes.
NoLigatures { get; set; }Gets/sets a flag that cancels ligatures in all fonts.
OutputDirectory { get; set; }Gets/sets TeX output directory.
RasterizeFormulas { get; set; }Gets/sets a flag that allows to rasterize math formulas.
Repeat { get; set; }Gets/sets the flag indicating whether it is necessary to run the TeX job twice in case, for example, there are references in input TeX file(s). In general, this behavior is useful when the engine collects some data along the typesetting process and stores it in an auxilliary file, all at the first run. And at the second run, the engine somehow uses that data.
RequiredInputDirectory { get; set; }Gets/sets TeX requires input directory. Required input is the files that are somehow included into the main .tex file, e.g., packages for which there’s no built-in support.
ShowTerminalOutput { get; set; }Gets/sets the flag indicating whether to show terminal output on the console.
SubsetFonts { get; set; }Gets/sets the flag indicating whether to subset fonts in output file or not.
WarningHandler { get; set; }Callback to handle any warnings generated. The WarningHandler returns ReturnAction enum item specifying either Continue or Abort. Continue is the default action and the Load operation continues, however the user may also return Abort in which case the Load operation should cease.


The following example shows how to convert TeX file to PDF file

	// The path to the documents directory.
	string dataDir = @"YOUR_DATA_DIRECTORY";

	// The path to your TeX File.
	string texFile = Path.Combine(dataDir, "TeX-to-PDF.tex");

	// The path to output PDF File.
	string pdfFile = Path.Combine(dataDir, "Tex-to-PDF.pdf");

	// Initialize TeXLoadOptions	
	TeXLoadOptions texLoadOptions = new TeXLoadOptions();
	using (Document pdfDocument = new Document(texFile, texLoadOptions))
		// Save PDF file

    ' The path to the documents directory.
    Dim dataDir As String = "YOUR_DATA_DIRECTORY"

    ' The path to your TeX File.
    Dim texFile = Path.Combine(dataDir, "TeX-to-PDF.tex")

    ' The path to output PDF File.
    Dim pdfFile = Path.Combine(dataDir, "Tex-to-PDF.pdf")
    ' Initialize TeXLoadOptions
    Dim texLoadOptions As TeXLoadOptions = New TeXLoadOptions()
    Using pdfDocument As Document = New Document(texFile, texLoadOptions)
        ' Save PDF file
    End Using

See Also