Components for Developers
© 2000-2012, Two Pilots

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF-X Pilot History In the Lab

PDF Creator Pilot documentation

Download CHM version of this manual.
Text
SetTextHorizontalScaling

See Also Example
Collapse All

This method sets the horizontal scaling factor.

Syntax

SetTextHorizontalScaling (
FLOAT scaling
)
Parameters
scaling
Value (as a percentage) of the horizontal scaling factor

Return value
This method sets the horizontal scaling factor as a percentage. This expands or compresses the horizontal dimension of the string. The default value for this parameter is 100(%).

Example

Using Horizontal Scaling

Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
for i := 7 to 15 do
begin
    PDF.SetTextHorizontalScaling(i * 10);
    PDF.ShowTextAt(20, 20 * (i - 6), 'Text string. Scale %: ' + IntToStr(i * 10));
end;
PDF.SaveToFile('test.pdf', true);
C/C++
[copy to clipboard]
// PDF object is supposed to be created
for (int i = 7; i < 16; i++)
{
    PDF->SetTextHorizontalScaling(i * 10);
    CString str;
    str.Format("Text string. Scale %%: %d", i * 10);
    PDF->ShowTextAt(20, 20 * (i - 6), (LPCTSTR)str);
}
PDF->SaveToFile("test.pdf", true);
C#
[copy to clipboard]
// PDF object is supposed to be created
for (int i = 7; i < 16; i++)
{
    PDF.SetTextHorizontalScaling(i * 10);
    string str = String.Format("Text string. Scale %: {0}", i * 10);
    PDF.ShowTextAt(20, 20 * (i - 6), str);
}
PDF.SaveToFile("test.pdf", true);
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
For i = 7 To 15
    PDF.SetTextHorizontalScaling i * 10
    PDF.ShowTextAt 20, 20 * (i - 6), "Text string. Scale %: " & (i * 10)
Next
PDF.SaveToFile "test.pdf", true

See Also

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF-X Pilot History In the Lab

 

 

PDF Library | Virtual Printer | Converters to PDF

Support | Blog | Forum | Contacts

© 2000-2012, Two Pilots