std.pdf.objects

Primitive PDF-Objekte und Pufferverwaltung: Integers, Reals, Strings, Namen, Arrays, Dictionaries und Streams als Lyx-Typen. Diese Unit bildet die unterste Schicht der PDF-Bibliothek — sie wird intern von std.pdf.builder und std.pdf.graphics verwendet.

Direkte Nutzung ist nur bei der Erzeugung benutzerdefinierter PDF-Strukturen nötig (z. B. eigene Dictionaries für Verschlüsselung oder Signaturen).

std.pdf · std.pdf.compress · std.pdf.builder


Funktionen

Signatur Sichtbarkeit Beschreibung
pdfByte(buf: int64, pos: int64, b: int64): int64 pub Append single byte to output buffer at pos, return new pos
pdfStr(buf: int64, pos: int64, s: pchar): int64 pub Append NUL-terminated string, return new pos
pdfBytes(buf: int64, pos: int64, src: int64, n: int64): int64 pub Append n raw bytes from memory address src
pdfInt(buf: int64, pos: int64, v: int64): int64 pub Append decimal integer
pdfIntPadded(buf: int64, pos: int64, v: int64, width: int64): int64 pub Append zero-padded integer of exactly 'width' decimal digits
pdfSignedReal100(buf: int64, pos: int64, v100: int64): int64 pub Append signed real stored as int64 × 100; handles negative values correctly. pdfReal100 is broken for negative non-integer values (e.g. -3950 → „-39.-50“).
pdfReal100(buf: int64, pos: int64, v100: int64): int64 pub Append real stored as int64 × 100 (e.g. 59528 → „595.28“, 61200 → „612“)
f64ToInt100(v: f64): int64 pub f64ToInt100: |v| * 100, kaufmaennisch gerundet. Der BETRAG ist Absicht — pdfReal schreibt das Vorzeichen selbst und ruft diese Funktion danach mit dem negativen
f64Trunc(v: f64): int64 pub f64Trunc: Ganzzahlanteil, Richtung Null abgeschnitten.
pdfReal(buf: int64, pos: int64, v: f64): int64 pub Append f64 value with up to 2 decimal places. Uses f64ToInt100 to avoid broken f64 arithmetic.
pdfObjHdr(buf: int64, pos: int64, id: int64): int64 pub Append „N 0 obj\n“
pdfObjFtr(buf: int64, pos: int64): int64 pub Append „\nendobj\n“
pdfRef(buf: int64, pos: int64, id: int64): int64 pub Append „N 0 R“ (indirect reference)
pdfLiteralStr(buf: int64, pos: int64, s: pchar): int64 pub Append PDF literal string „(text)“ with escaping of '(' ')' '\'
pdfName(buf: int64, pos: int64, name: pchar): int64 pub Append PDF Name „/name“
pdfFontName(idx: int64): pchar pub Return the PostScript name for a Standard-14 font index (0..13)
pdfXrefEntry(buf: int64, pos: int64, offset: int64, gen: int64, free: bool): int64 pub Append one XRef entry: „OOOOOOOOOO GGGGG T\r\n“ (exactly 20 bytes)

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