PDF Creator Pilot documentation |
Download CHM version of this manual. |
|
![]() ![]() Collapse AllThis method adds one of 14 built-in fonts using the font style specified. It returns a font identifier.
|
| LONG AddBuiltInFont ( BuiltInFont font, VARIANT_BOOL underline, VARIANT_BOOL strikeout ) |
Parameters
font
One of 14 built-in fonts
underline
VARIANT_TRUE turns on the font's underline property.
strikeout
VARIANT_TRUE turns on the font's strikeout property.
Return value
Example
Adding a Built-In Font
Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
fnt1 := PDF.AddBuiltInFont(bfHelveticaOblique, false, false);
fnt2 := PDF.AddBuiltInFont(bfCourierBold, false, false);
PDF.UseFont(fnt1, 14);
PDF.ShowTextAt(20, 20, 'Helvetica oblique.');
PDF.UseFont(fnt2, 14);
PDF.ShowTextAt(20, 40, 'Courier bold.');
PDF.SaveToFile('test.pdf', true);
C/C++
[copy to clipboard]
// PDF object is supposed to be created
long fnt1 = PDF->AddBuiltInFont(BuiltInFont.bfHelveticaOblique, false, false);
long fnt2 = PDF->AddBuiltInFont(BuiltInFont.bfCourierBold, false, false);
PDF->UseFont(fnt1, 14);
PDF->ShowTextAt(20, 20, "Helvetica oblique.");
PDF->UseFont(fnt2, 14);
PDF->ShowTextAt(20, 40, "Courier bold.");
PDF->SaveToFile("test.pdf", true);
C#
[copy to clipboard]
// PDF object is supposed to be created
long fnt1 = PDF.AddBuiltInFont(BuiltInFont.bfHelveticaOblique, false, false);
long fnt2 = PDF.AddBuiltInFont(BuiltInFont.bfCourierBold, false, false);
PDF.UseFont(fnt1, 14);
PDF.ShowTextAt(20, 20, "Helvetica oblique.");
PDF.UseFont(fnt2, 14);
PDF.ShowTextAt(20, 40, "Courier bold.");
PDF.SaveToFile("test.pdf", true);
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created fnt1 = PDF.AddBuiltInFont(9, false, false) 'BuiltInFont.bfHelveticaOblique fnt2 = PDF.AddBuiltInFont(6, false, false) 'BuiltInFont.bfCourierBold PDF.UseFont fnt1, 14 PDF.ShowTextAt 20, 20, "Helvetica oblique." PDF.UseFont fnt2, 14 PDF.ShowTextAt 20, 40, "Courier bold." PDF.SaveToFile "test.pdf", true
See Also
Reference


