Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

PdfPage.OffsetContent(Double, Double) Method

Offsets the page content.

Namespace: DevExpress.Pdf

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

NuGet Package: DevExpress.Pdf.Core

#Declaration

public void OffsetContent(
    double dx,
    double dy
)

#Parameters

Name Type Description
dx Double

The horizontal offset (in points).

dy Double

The vertical offset (in points).

#Remarks

The OffsetContent 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.

#Example

The code sample below specifies the content offset:

offset content

using DevExpress.Pdf;

using (PdfDocumentProcessor processor = new PdfDocumentProcessor())
{
    processor.LoadDocument(@"Document.pdf");
    PdfPage page = processor.Document.Pages[0];
    page.OffsetContent(50, 50);
    processor.SaveDocument("result.pdf");
}
See Also