Components for Developers
© 2000-2008, Two Pilots

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF Add-on History In the Lab

PDF Creator Pilot documentation

Download CHM version of this manual.
Text
Collapse All

This method sets the text rise value.

Syntax

HRESULT SetTextRise (
FLOAT rise
)
Parameters
rise
New text rise value

Return value
If successful, this method returns S_OK. If it fails, this method should return one of the error values.

Remarks

Text rise specifies the distance to move the baseline up or down from its default location. Positive values of text rise move the baseline up. Adjustments to the baseline are useful for drawing superscripts or subscripts. The default location of the baseline can be restored by setting the text rise to 0.

Example

Adjusting the Baseline

Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
fnt := PDF.AddFont('Verdana', false, false, false, false, fcDefault);
PDF.UseFont(fnt, 14);
PDF.SetTextRise(0);
PDF.ShowTextAt(30, 30, 'ABC');
PDF.SetTextRise(7);
PDF.ShowText('ABC');
PDF.SetTextRise(-7);
PDF.ShowText('ABC');
PDF.SaveToFile('test.pdf', true);
C/C++
[copy to clipboard]
// PDF object is supposed to be created
long fnt = PDF->AddFont("Verdana", false, false, false, false, fcDefault);
PDF->UseFont(fnt, 14);
PDF->SetTextRise(0);
PDF->ShowTextAt(30, 30, "ABC");
PDF->SetTextRise(7);
PDF->ShowText("ABC");
PDF->SetTextRise(-7);
PDF->ShowText("ABC");
PDF->SaveToFile("test.pdf", true);
C#
[copy to clipboard]
// PDF object is supposed to be created
long fnt = PDF.AddFont("Verdana", false, false, false, false, FontCharset.fcDefault);
PDF.UseFont(fnt, 14);
PDF.SetTextRise(0);
PDF.ShowTextAt(30, 30, "ABC");
PDF.SetTextRise(7);
PDF.ShowText("ABC");
PDF.SetTextRise(-7);
PDF.ShowText("ABC");
PDF.SaveToFile("test.pdf", true);
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
fnt = PDF.AddFont("Verdana", false, false, false, false, 0)'FontCharset.fcDefault
PDF.UseFont fnt, 14
PDF.SetTextRise 0
PDF.ShowTextAt 30, 30, "ABC"
PDF.SetTextRise 7
PDF.ShowText "ABC"
PDF.SetTextRise -7
PDF.ShowText "ABC"
PDF.SaveToFile "test.pdf", true

See Also

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF Add-on History In the Lab

 

 

PDF Library | Virtual Printer | Converters to PDF

Support | Blog | Forum | Contacts

© 2000-2008, Two Pilots