PDF Creator Pilot documentation |
Download CHM version of this manual. |
|
![]() ![]() Collapse AllSets the horizontal scaling factor.
|
| HRESULT PDFPAGE_SetHorizontalScaling ( DOUBLE factor ) |
Parameters
factor
Horizontal scaling factor value (in percents).
Return value
If successful, this method returns S_OK. If it fails, this method should return one of the error values.
Remarks
This method sets the horizontal scaling factor in a percentage. This expands or compresses the horizontal dimension of the string. The default value for this parameter is 100(%).
Example
Using horizontal scaling for text out
Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.BeginDoc;
PDF.PDFPAGE_SetActiveFont('Verdana', false, false, false, false, 16.0, 0)
for i := 7 to 15 do
begin
PDF.PDFPAGE_SetHorizontalScaling(i * 10);
PDF.PDFPAGE_TextOut 20, 20 * (i - 6), 0.0, 'Text string. Scale %: ' + IntToStr(i * 10);
end;
PDF.EndDoc;
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->BeginDoc();
PDF->PDFPAGE_SetActiveFont("Verdana", FALSE, FALSE, FALSE, FALSE, 16.0, 0)
for (int i = 7; i < 16; i++)
{
PDF->PDFPAGE_SetHorizontalScaling(i * 10);
CString str;
str.Format("Text string. Scale %%: %d", i * 10);
PDF->PDFPAGE_TextOut 20, 20 * (i - 6), 0.0, (LPCTSTR)str);
}
PDF->EndDoc();
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.BeginDoc();
PDF.PDFPAGE_SetActiveFont("Verdana", false, false, false, false, 16.0, 0)
for (int i = 7; i < 16; i++)
{
PDF.PDFPAGE_SetHorizontalScaling(i * 10);
string str = String.Format("Text string. Scale %: {0}", i * 10);
PDF.PDFPAGE_TextOut 20, 20 * (i - 6), 0.0, str);
}
PDF.EndDoc();
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
PDF.BeginDoc
PDF.PDFPAGE_SetActiveFont "Verdana", False, False, False, False, 16.0, 0
For i = 7 To 15
PDF.PDFPAGE_SetHorizontalScaling i * 10
PDF.PDFPAGE_TextOut 20, 20 * (i - 6), 0.0, "Text string. Scale %: " & (i * 10)
Next
PDF.EndDoc
See Also
Reference


