SoftZenPdf SoftZenPdf

Method SetFont

Namespace
SoftZenPdf
Assembly
SoftZenPdf.dll

SetFont(PdfFont, double)

Selects the font and size for following text (operator Tf).

public ContentStreamWriter SetFont(PdfFont font, double size)

Parameters

font PdfFont

A StandardFont or TrueTypeFont.

size double

Font size, in points.

Returns

ContentStreamWriter

Exceptions

InvalidOperationException

A standard 14 font is used in a PDF/A document, where every font must be embedded.

SoftZenPdf 1.1.0 · © 2026 SoftZen Systems · Commercial software, free Community license · Generated from the library's XML documentation