procedure AddText(const Text, Font: WString; FontSize: Single; X, Y: Double; Color: TColor = clBlack; Alpha: Byte = $FF; Angle: Double = 0.0);
| FontSize | Single. Font size in points (e.g. 12.0 for 12 pt text). |
| Color | TColor. Text fill color. Default is clBlack. |
| Alpha | Byte. Metnin opaklığı; $00 tamamen saydam, $FF tamamen opaktır. Varsayılan $FF'dir |
| Angle | Double. Rotation angle in degrees, measured counterclockwise from the positive X axis. Default is 0.0 (horizontal). |
AddText belirtilen yazı tipi ve boyutu kullanarak bir Unicode metin dizesini geçerli PDF sayfasına işler. Konum (X, Y) ilk karakterin temel çizgi başlangıcıdır ve PDF kullanıcı birimleriyle sayfanın sol alt köşesinden ölçülür (orijin sol altta, Y yukarı doğru artar).
The font is identified by its PostScript or family name (e.g. 'Arial', 'Times New Roman'). Yazı tipi sistemde bulunmalı ya da belgeye gömülü olmalıdır; PDFium istenen yazı tipini bulamazsa varsayılan bir yazı tipi kullanır
Use the Color and Alpha parameters to control the appearance of the text fill. Set Alpha to a value less than $FF to render semi-transparent text. The Angle parameter rotates the entire text string counterclockwise around the baseline origin.
Bu yöntem metni yeni bir sayfa nesnesi olarak ekler. Eklendikten sonra mevcut bir metin nesnesinin içeriğini değiştirmek için şunu kullanın SetText.
// Add a title string near the top of an A4 page
// A4 page height = 841.89 pt; place text 50 pt from the top
Pdf1.NewPage(595, 842);
Pdf1.AddText('Hello, PDFiumPas!', 'Arial', 24, 72, 768);
// Red text at 45 degrees with 50% opacity
Pdf1.AddText('Rotated', 'Arial', 18, 200, 400, clRed, $80, 45);