THotPDF.StampLoadedPageText

THotPDF

 

Top  Previous  Next

Stamps text content on a loaded page

 

Delphi syntax:

procedure StampLoadedPageText( PageIndex: Integer; const Text: WideString; X, Y: Single; Angle: Extended; Opacity: Single; const FontName: AnsiString; FontStyle: TFontStyles; FontSize: Single; Color: TColor; Underlay: boolean= False );

 

Description

Resource category keys and graphics-state resource names are case-sensitive; the stamp reuses an existing resource only when it has the generated four-key shape /Type /ExtGState, /ca, /CA, and /BM /Normal, with matching requested opacity

Existing resources with a soft mask, a different blend mode, additional graphics-state definitions, or incompatible types remain unchanged, and the stamp receives a separate compatible resource; repeated compatible stamps can reuse that resource

Stamping one page preserves the content and resources of other pages, including pages sharing original resource dictionaries; existing content that temporarily changes graphics state should restore its q/Q scope before the appended stamp

When a stamp extends an existing content stream, graph transaction rollback restores the original stream data and resource bindings

The requested text opacity supplies both /ca and /CA; existing standard-font WinAnsi text behavior is unchanged

The standard-font text path encodes characters representable by WinAnsi (Windows-1252), including café, €, Œ and —, without using the host ANSI code page

Characters outside that encoding use a ? placeholder for each Unicode scalar, so a valid surrogate pair produces one placeholder; this standard-font path does not embed a Unicode font or perform complex shaping

Generated stamp fonts declare /WinAnsiEncoding; an existing font resource with incompatible encoding or additional definitions is preserved and a separate compatible resource is selected instead of reusing its name

Stamps text content on a loaded page

Draws transparent or angled watermark text on the page

 

See also: THotPDF