PDFPAGE_Scale
IPDFDocument3 :: PDF page methods

See Also Example
Collapse All

This method scales PDF document page coordinates.

Syntax

HRESULT PDFPAGE_Scale (
DOUBLE x,
DOUBLE y
)
Parameters
x
Horizontal scale factor.

y
Vertical scale factor.

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

Remarks

This method scales the coordinate system by scaling factors supplied forĀ x andĀ y dimensions.

Equivalent in new interface: IPDFDocument4::ScaleCoords.

Example

Scaling Coordinates

Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.BeginDoc;
PDF.PDFPAGE_Rectangle(10, 10, 310, 210);
PDF.PDFPAGE_Stroke;
PDF.PDFPAGE_Scale(0.5, 0.5);
PDF.PDFPAGE_Rectangle(10, 10, 310, 210);
PDF.PDFPAGE_Stroke;
PDF.EndDoc;
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->BeginDoc();
PDF->PDFPAGE_Rectangle(10, 10, 310, 210);
PDF->PDFPAGE_Stroke();
PDF->PDFPAGE_Scale(0.5, 0.5);
PDF->PDFPAGE_Rectangle(10, 10, 310, 210);
PDF->PDFPAGE_Stroke();
PDF->EndDoc();
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.BeginDoc();
PDF.PDFPAGE_Rectangle(10, 10, 310, 210);
PDF.PDFPAGE_Stroke();
PDF.PDFPAGE_Scale(0.5, 0.5);
PDF.PDFPAGE_Rectangle(10, 10, 310, 210);
PDF.PDFPAGE_Stroke();
PDF.EndDoc();
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
PDF.BeginDoc
PDF.PDFPAGE_Rectangle 10, 10, 310, 210
PDF.PDFPAGE_Stroke
PDF.PDFPAGE_Scale 0.5, 0.5
PDF.PDFPAGE_Rectangle 10, 10, 310, 210
PDF.PDFPAGE_Stroke
PDF.EndDoc

See Also

Reference