@syncfusion/ej2-pdf
Version:
Feature-rich JavaScript PDF library with built-in support for loading and manipulating PDF document.
62 lines (61 loc) • 2.01 kB
TypeScript
import { PdfFont, PdfStringFormat } from '../../fonts';
import { PdfDocument } from '../../pdf-document';
import { Point } from '../../pdf-type';
import { PdfBrush, PdfGraphics } from '../pdf-graphics';
import { PdfTemplate } from '../pdf-template';
import { PdfDynamicField } from './dynamic-field';
/**
* Represents an internal dynamic field that maintains a single cached value for rendering.
*
* @private
*/
export declare class PdfSingleValueField extends PdfDynamicField {
/**
* Holds the template used for rendering the field value.
*
* @private
*/
_template: PdfTemplate;
/**
* Stores the cached string value of the field.
*
* @private
*/
_cachedValue: string;
/**
* Keeps a reference to the document associated with the cached value.
*
* @private
*/
_cachedDocument: PdfDocument;
/**
* Initializes the base dynamic field with optional font, brush, and string format settings.
*
* @private
*
* @param {PdfFont} [font] - The font used for rendering the field text.
* @param {PdfBrush} [brush] - The brush used to define the text color.
* @param {PdfStringFormat} [stringFormat] - The format used for text layout and alignment.
* @returns {void} Does not return a value.
*/
_initializeBase(font?: PdfFont, brush?: PdfBrush, stringFormat?: PdfStringFormat): void;
/**
* Performs single-value rendering with caching.
*
* @private
* @param {PdfGraphics} graphics The graphics context.
* @param {Point} location The drawing location.
* @returns {void} Nothing.
*/
_performDraw(graphics: PdfGraphics, location: Point): void;
/**
* Gets the string value produced by this field.
*
* @private
* @param {PdfGraphics} graphics
* The graphics context used during rendering.
*
* @returns {string} The resolved string value for the field.
*/
_getValue(graphics: PdfGraphics): string;
}