PDF Creator Pilot documentation |
Download CHM version of this manual. |
|
![]() ![]() Collapse AllThis property gets or sets the control's font name.
|
| BSTR PDFANNOTATION_Font_Name { get; set; } |
Value
Name of the font
Remarks
Each control may contain text that is shown with the default font. You can change any font attributes, such as Character set, Color, Name, Size and Style.
Equivalent in new interface: IPDFDocument4::ControlFont.
Example
Setting a Custom Font for a Control
Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.BeginDoc;
PDF.PDFPAGE_CreateControl_Edit('edt1', 10, 10, 150, 30);
PDF.PDFANNOTATION_Text := 'Text';
PDF.PDFANNOTATION_Font_Name := 'Times';
PDF.PDFANNOTATION_Font_Color := 255;
PDF.PDFANNOTATION_Font_Charset := charsetANSI_CHARSET;
PDF.PDFANNOTATION_Font_Size := 8;
PDF.PDFANNOTATION_Font_Style_fsBold := true;
PDF.PDFANNOTATION_Font_Style_fsItalic := true;
PDF.PDFANNOTATION_Font_Style_fsStrikeout := true;
PDF.PDFANNOTATION_Font_Style_fsUnderline := true;
PDF.EndDoc;
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->BeginDoc();
PDF->PDFPAGE_CreateControl_Edit("edt1", 10, 10, 150, 30);
PDF->PDFANNOTATION_Text = "Text";
PDF->PDFANNOTATION_Font_Name = "Times";
PDF->PDFANNOTATION_Font_Color = 255; // red
PDF->PDFANNOTATION_Font_Charset = charsetANSI_CHARSET;
PDF->PDFANNOTATION_Font_Size = 8;
PDF->PDFANNOTATION_Font_Style_fsBold = TRUE;
PDF->PDFANNOTATION_Font_Style_fsItalic = TRUE;
PDF->PDFANNOTATION_Font_Style_fsStrikeout = TRUE;
PDF->PDFANNOTATION_Font_Style_fsUnderline = TRUE;
PDF->EndDoc();
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.BeginDoc();
PDF.PDFPAGE_CreateControl_Edit("edt1", 10, 10, 150, 30);
PDF.PDFANNOTATION_Text = "Text";
PDF.PDFANNOTATION_Font_Name = "Times";
PDF.PDFANNOTATION_Font_Color = 255; // red
PDF.PDFANNOTATION_Font_Charset = TxFontCharset.charsetANSI_CHARSET;
PDF.PDFANNOTATION_Font_Size = 8;
PDF.PDFANNOTATION_Font_Style_fsBold = true;
PDF.PDFANNOTATION_Font_Style_fsItalic = true;
PDF.PDFANNOTATION_Font_Style_fsStrikeout = true;
PDF.PDFANNOTATION_Font_Style_fsUnderline = true;
PDF.EndDoc();
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created PDF.BeginDoc PDF.PDFPAGE_CreateControl_Edit "edt1", 10, 10, 150, 30 PDF.PDFANNOTATION_Text = "Text" PDF.PDFANNOTATION_Font_Name = "Times" PDF.PDFANNOTATION_Font_Color = 255 PDF.PDFANNOTATION_Font_Charset = 0 'charsetANSI_CHARSET PDF.PDFANNOTATION_Font_Size = 8 PDF.PDFANNOTATION_Font_Style_fsBold = True PDF.PDFANNOTATION_Font_Style_fsItalic = True PDF.PDFANNOTATION_Font_Style_fsStrikeout = True PDF.PDFANNOTATION_Font_Style_fsUnderline = True PDF.EndDoc
See Also
Reference


