std.pdf.builder

XRef-Tabelle, Trailer und Cross-Reference-Stream aufbauen; PDF-Dokument aus Objekt-Ids und Content-Streams zusammensetzen. Diese Unit ist das Herzstück des PDF-Generators — sie wird von std.pdf intern verwendet.

Direkte Nutzung ist nur notwendig, wenn benutzerdefinierte indirekte PDF-Objekte (Signaturen, Verschlüsselung, proprietäre Extensions) erzeugt werden müssen.

std.pdf · std.pdf.objects · std.pdf.compress


Funktionen

Signatur Sichtbarkeit Beschreibung
arrGet(arr: int64, idx: int64): int64 pub Internal helpers
arrSet(arr: int64, idx: int64, val: int64): void pub
zeroMem(ptr: int64, size: int64): void pub
mmapAlloc(size: int64): int64 pub
PdfNew(): int64 pub PdfNew — create a new empty document Returns: doc handle (int64 pointer), or 0 on failure
PdfFree(doc: int64): void pub PdfFree — release all document memory
PdfSetCompression(doc: int64, level: int64): void pub PdfSetCompression, PdfPageCount
PdfPageCount(doc: int64): int64 pub
pdfXBuf(doc: int64, pg: int64): int64 pub
pdfXPos(doc: int64, pg: int64): int64 pub
pdfXSetPos(doc: int64, pg: int64, p: int64): void pub
pdfXFontIdx(doc: int64, pg: int64): int64 pub
pdfXSetFontIdx(doc: int64, pg: int64, idx: int64): void pub
pdfXFontSize100(doc: int64, pg: int64): int64 pub
pdfXSetFontSize100(doc: int64, pg: int64, sz: int64): void pub
pdfXTextColor(doc: int64, pg: int64): int64 pub
pdfXSetTextColor(doc: int64, pg: int64, color: int64): void pub
pdfXFontMask(doc: int64, pg: int64): int64 pub
pdfXSetFontMask(doc: int64, pg: int64, mask: int64): void pub
PdfContentEnsure(doc: int64, pageIdx: int64, needed: int64): int64 pub
PdfContentAppendStr(doc: int64, pageIdx: int64, s: pchar): int64 pub
PdfContentAppendBytes(doc: int64, pageIdx: int64, data: int64, len: int64): int64 pub
PdfSetUserPassword(doc: int64, pwd: pchar): void pub WP-PDF-17: Public API — call before PdfSave Set user password (required for opening the document; max 32 bytes).
PdfSetOwnerPassword(doc: int64, pwd: pchar): void pub Set owner password (required for editing rights; max 32 bytes).
PdfSetPermissions(doc: int64, flags: int64): void pub Set permission flags. OR together PDF_PERM_* constants for allowed operations. Default: PDF_PERM_ALL (-4 = all allowed). Restrictions take effect with user pass
PdfSetEncryption(doc: int64, encType: int64): void pub Enable encryption. Only PDF_ENC_RC4_128 is implemented; others are accepted but degrade to RC4-128. Call PdfSetUserPassword before PdfSave.
PdfSave(doc: int64, path: pchar): int64 pub PdfSave — serialize document to a PDF file Returns: 0 on success, negative on error

Signaturen automatisch aus std/pdf/builder.lyx erzeugt (Stand 2026-08-02, lyxc 1.0.21A). Beschreibungen stammen aus den Quellkommentaren und sind teilweise unvollständig.