Teksen motorn
Teksen motorn
TeXJob är den viktigaste ingångspunkten för Aspose.TeX FOSS-motorn. Det accepterar en inputkälla, en output-enhet och valfri TeXOptions,Och sedan kör de Typ av pipeline.
Constructor
TeXJob(source: InputSource, device: OutputDevice, options: TeXOptions | None = None)| Parameter | Type | Description |
|---|---|---|
source | InputSource | FileInputSource eller StringInputSource |
device | OutputDevice | PdfDevice, DviDevice,eller SvgDevice |
options | TeXOptions | Motoralternativ; default till TeXOptions() |
Kör motorn
Call run() för att utföra typing:
from aspose_tex import TeXJob, TeXOptions, PdfDevice, StringInputSource
job = TeXJob(StringInputSource("Hello!"), PdfDevice(), options=TeXOptions())
output_bytes = job.run()Returnvärdet är bytes för PdfDevice och DviDevice.För SvgDevice, Returnvärdet är None;sidor återhämtas med SvgDevice.get_all_pages().
Texoptioner
TeXOptions() konfigurerar motorn. Konstruera den utan argument använder Standard TeX-default som är lämpliga för de flesta dokument.
API Referens sammanfattning
| Klass / Metod | Description |
|---|---|
TeXJob | Motorens huvudintressepunkt |
TeXJob.run() | Exekuta typisering; retur utgång byter |
TeXOptions | Motorkonfiguration |
PdfDevice | PDF utgångsutrustning |
DviDevice | DVI utgångsutrustning |
SvgDevice | SVG utgångsutrustning |
SvgDevice.get_all_pages() | Return per-page SVG byte strängar |