TeX-engine
TeX Engine
TeXJob is het belangrijkste toegangspunt voor de Aspose.TeX FOSS-engine. Het accepteert een invoerbron, een uitvoerapparaat en optionele TeXOptions, en voert vervolgens de typesetting-pijplijn uit.
Constructor
TeXJob(source: InputSource, device: OutputDevice, options: TeXOptions | None = None)| Parameter | Type | Beschrijving |
|---|---|---|
source | InputSource | FileInputSource of StringInputSource |
device | OutputDevice | PdfDevice, DviDevice, of SvgDevice |
options | TeXOptions | Engine-opties; standaard op TeXOptions() |
Engine uitvoeren
Roep run() aan om typesetting uit te voeren:
from aspose_tex import TeXJob, TeXOptions, PdfDevice, StringInputSource
job = TeXJob(StringInputSource("Hello!"), PdfDevice(), options=TeXOptions())
output_bytes = job.run()De retourwaarde is bytes voor PdfDevice en DviDevice. Voor SvgDevice is de retourwaarde None; pagina’s worden opgehaald met SvgDevice.get_all_pages().
TeXOptions
TeXOptions() configureert de engine. Het construeren zonder argumenten gebruikt de standaard TeX defaults, die geschikt zijn voor de meeste documenten.
API Reference Samenvatting
| Klasse / Methode | Beschrijving |
|---|---|
TeXJob | Hoofdtoegangspunt van de engine |
TeXJob.run() | Voer typesetting uit; retourneer output bytes |
TeXOptions | Engine-configuratie |
PdfDevice | PDF-uitvoerapparaat |
DviDevice | DVI-uitvoerapparaat |
SvgDevice | SVG-uitvoerapparaat |
SvgDevice.get_all_pages() | Retourneer per-pagina SVG-byte strings |