API reference

Text

70 functions. Every declaration on the detail pages is extracted from the shipped bindings.

Conversion

pdfConvToFreeTextCallout Convert an existing Line annotation into a FreeText annotation

Core

pdfBeginContinueText Start a "typewriter" text-continuation cursor at a starting
pdfEndContinueText Close the text-continuation cursor opened by
pdfExtractText Extract the visible text of one page, either from the document
pdfInitExtGState Initialize a TPDFExtGState record to sensible defaults before
pdfIsBidiText Quick check for whether AText contains any characters from a
pdfReplacePageText Nominally "replace page text"; actually replaces the first
pdfReplacePageTextEx Unicode-capable sibling of
pdfReplacePageTextNth Replace exactly the Index-th non-empty literal show-string
pdfSplitPageText Extract a page's full text as a single #10-joined string

Getters

pdfGetFTextHeight Predict the total height (in points) that
pdfGetFTextHeightEx Same as [pdfGetFTextHeight](#api-pdfgetftextheight), but
pdfGetHTMLTextHeight Predict the total height pdfDrawHTMLText would occupy for
pdfGetHTMLTextLineCount Predict the number of lines pdfDrawHTMLText would produce.
pdfGetHTMLTextWidth Measure the natural (unwrapped) width of HTML at Size —
pdfGetLastTextOffset Byte offset within the current page's content stream where the
pdfGetLastTextPosX X coordinate after the most recent successful text write.
pdfGetLastTextPosXAbs Nominally: the last text X position in absolute (untransformed)
pdfGetLastTextPosY Y coordinate after (or at the start of, depending on the last
pdfGetLastTextPosYAbs Y position of the last text written — a duplicate export of
pdfGetPageText Decode the currently active output page's text directly
pdfGetTextBBox Compute a bounding box for Text at the current font/size, as
pdfGetTextBlockAsString Extract one page's text and return a single "block" (line) by
pdfGetTextDrawMode Read the current text rendering mode (PDF Tr operand).
pdfGetTextRect Read back the current flow-text rectangle set by
pdfGetTextRise Read the current text rise (PDF Ts operand — vertical baseline
pdfGetTextScaling Read the current horizontal text scaling (PDF Tz operand).
pdfGetTextWidth Measure the width, in points, of AText at the current
pdfGetTextWidthEx Explicit-length variant of
pdfGetWrappedText Word-wrap Text to Width at the current font/size, returning
pdfGetWrappedTextBreakString Same as [pdfGetWrappedText](#api-pdfgetwrappedtext), but a
pdfGetWrappedTextLineCount Count how many lines [pdfGetWrappedText](#api-pdfgetwrappedtext)

Misc

psrDeleteText Delete every text-showing operator whose origin point falls
psrExtractText Extract text from an already-parsed context's runs, optionally
psrFindText Find the next occurrence of Text within the parsed context's
psrGetSelText Read the text pointer/length out of an already-populated
psrGetTextDrawMode Extract the text render-mode field from a packed DrawParms
psrReplaceSelText Replace the text of a selection (from
psrSetTextDrawMode Set the text render-mode field within a packed DrawParms
psrWriteToPage Commit the pending edit staged by

Setters

pdfSetExtColorSpace Nominally: set the "current" extended color space handle.
pdfSetExtFillColorSpace Nominally: set the "current" extended fill color space handle.
pdfSetExtGState Apply a previously-created /ExtGState resource to the
pdfSetExtGStatePrepress Configure the prepress-related fields (/TR transfer, /BG
pdfSetExtStrokeColorSpace Nominally: set the "current" extended stroke color space
pdfSetTextDrawMode Set the text rendering mode; emitted immediately as a Tr
pdfSetTextExtractionScaling Apply a coordinate scale factor to extracted-text run positions
pdfSetTextExtractionWordGap Set the horizontal gap threshold (in text-space units) above
pdfSetTextRect Set the rectangle [pdfWriteFText](E01_CoreTextOutput.md#api-pdfwriteftext)
pdfSetTextRise Set text rise; emitted immediately as a Ts operator.
pdfSetTextScaling Set horizontal text scaling; emitted immediately as a Tz
pdfSetTextShader Nominally: associate a named shading pattern with subsequent
pdfSetTextUnderline Turn underlining on/off for subsequent text writes.
pdfSetTextUnderlineColor Set the underline stroke color as device RGB.
pdfSetTextUnderlineColorCMYK Set the underline stroke color as device CMYK.
pdfSetTextUnderlineColorSep Set the underline stroke color as a named Separation (spot)
pdfSetTextUnderlineCustomDash Set an arbitrary PDF dash array for the underline stroke.
pdfSetTextUnderlineDash Set a simple on/off dash pattern for the underline stroke.
pdfSetTextUnderlineDistance Set the underline's vertical offset below the text baseline.
pdfSetTextUnderlineWidth Set the underline stroke width.
pdfSetWatermarkText Configure a diagonal text watermark stamped on every page

Text

pdfWriteAngleText Draw a single straight line of text rotated by Angle around
pdfWriteFText Word-wrap and draw AText inside the currently set text
pdfWriteFTextEx Same as [pdfWriteFText](#api-pdfwriteftext), but sets the
pdfWriteText Draw a single line of text at an absolute page position with the
pdfWriteTextEx Same as [pdfWriteText](#api-pdfwritetext), but takes an
pdfWriteTextMatrix Draw text with an explicit text-space transformation matrix
pdfWriteTextMatrixEx Explicit-length variant of

Vector Graphics

pdfDrawHTMLText Word-wrap and draw an HTML-subset fragment (see the chapter
pdfDrawTextArc Draw text along a circular arc — the real curved-baseline