.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

PdfDocumentProcessor.Document Property

Provides access to a PdfDocument class, which represents the current document.

Namespace: DevExpress.Pdf

Assembly: DevExpress.Docs.v21.1.dll

Declaration

public PdfDocument Document { get; }

Property Value

Type Description
PdfDocument

A current document.

Remarks

Use the Document property to access the current PDF document.

The PdfDocument object allows you to access the document’s pages (the PdfDocument.Pages property), bookmarks (the PdfDocument.Bookmarks property), file attachments (the PdfDocument.FileAttachments property), interactive forms (the PdfDocument.AcroForm property), etc.

The code sample below shows how to access the current document and rotate all pages.

This example rotates all document pages.

using DevExpress.Pdf;

//...

using (PdfDocumentProcessor pdfDocumentProcessor = new PdfDocumentProcessor())
{
    pdfDocumentProcessor.LoadDocument("..\\..\\docs\\TextRotate.pdf");
    int angle = 0;
    foreach (PdfPage page in pdfDocumentProcessor.Document.Pages)
    {
        angle = (angle + 90) % 360;
        page.Rotate = angle;
    }
    pdfDocumentProcessor.SaveDocument("..\\..\\docs\\Rotated.pdf");
}
See Also