property Align: TAlign; // published, inherited from TControl
Because TPdfView descends from TScrollingWinControl, it participates in the standard VCL/LCL layout system. Align tells the parent how to dock the viewer against one or more edges, which is the most common way to make a PDF reader fill an entire form, a panel inside a splitter, or a region of a tab sheet.
The most useful value for a PDF viewer is alClient, which makes the viewer absorb every remaining pixel of its parent after toolbars, status bars and side panels have been positioned. Combined with FitMode the page artwork rescales automatically whenever the user resizes the form, so the document always uses the largest possible area.
Whenever Align takes effect, the inherited resize logic recomputes the client area and the viewer's internal scroll range is rebuilt against the new size, so vertical scroll bars and the current page position stay correct. The OnResize event fires after the alignment is applied.
TAlign enum (alNone, alTop, alBottom, alLeft, alRight, alClient, alCustom).alLeft or alBottom and let PdfView1.Align := alClient fill the remainder — this preserves z-order semantics under all VCL container types.Anchors for fine-grained behaviour, leave Align as alNone; the two systems are mutually exclusive on the same control.
// Build a viewer that fills the form except for a toolbar on top
procedure TForm1.FormCreate(Sender: TObject);
begin
ToolBar1.Align := alTop;
StatusBar1.Align := alBottom;
PdfView1.Parent := Self;
PdfView1.Align := alClient;
PdfView1.FitMode := pfmFitToWidth;
PdfView1.Pdf := Pdf1;
Pdf1.LoadFromFile('sample.pdf');
PdfView1.Active := True;
end;