All docs
V20.2
20.2
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

PdfPage.ScaleContent(Double, Double) Method

Scales the page content.

Namespace: DevExpress.Pdf

Assembly: DevExpress.Pdf.v20.2.Core.dll

Declaration

public void ScaleContent(
    double scaleX,
    double scaleY
)
Public Sub ScaleContent(
    scaleX As Double,
    scaleY As Double
)

Parameters

Name Type Description
scaleX Double

The horizontal scale factor (1 is 100%).

scaleY Double

The vertical scale factor (1 is 100%).

Remarks

The ScaleContent method call does not affect the page size.

NOTE

PDF pages are measured in points. One point is 1/72nd of an inch (0.3528 mm). To convert this measurement unit to pixels, use the Units.PointsToPixelsF method.

The code sample below scales the content to 75%:

using (PdfDocumentProcessor processor = new PdfDocumentProcessor())
{
    processor.LoadDocument(@"Document.pdf");
    PdfPage page = processor.Document.Pages[0];
    page.ScaleContent(0.75,0.75);
    processor.SaveDocument("result.pdf");
}
TIP

To flip the content horizontally or vertically, specify a negative value for the method parameter.

See Also