Skip to main content

TdxPDFDocument Class

A PDF document container.

Declaration

TdxPDFDocument = class(
    TObject
)

Remarks

The TdxPDFDocument class implements an API for core document management functionality, such as load and save operations with support for encryption as well as digital signatures, content search and export, etc. The PDF Viewer control relies on a TdxPDFDocument class instance to load, store, and manage documents.

Main API Members

The list below outlines key members of the TdxPDFDocument class that allow you to load, parse, modify, and save PDF documents.

Code Example: Delete the First Two Document Pages

The following code example loads a PDF document, deletes the first two pages in it, and saves the resulting document to a different file:

var
  ADocument: TdxPDFDocument;
begin
  ADocument := TdxPDFDocument.Create;
  try
    ADocument.LoadFromFile('Data\Demo.pdf');
    ADocument.BeginUpdate;
    try
      ADocument.Pages.Delete(0);
      ADocument.Pages.Delete(1);
    finally
      ADocument.EndUpdate;
    end;
    ADocument.SaveToFile('Data\Result.pdf');
  finally
    ADocument.Free;
  end;

Direct TdxPDFDocument Class References

A PDF Viewer control’s Document property references a TdxPDFDocument object.

Inheritance

TObject
TdxPDFDocument
See Also