property Constraints: TSizeConstraints; // published, inherited from TControl
Constraints exposes the four sub-properties MinWidth, MaxWidth, MinHeight and MaxHeight (all default 0 = no limit). They clamp the resize logic driven by Align, Anchors, or explicit SetBounds calls, preventing the viewer from collapsing below a usable minimum or growing beyond a sensible maximum.
En las aplicaciones lectoras de PDF, las dimensiones mínimas son las que más importan: el renderizado se vuelve incómodo por debajo de aproximadamente 240 x 180, y las barras de desplazamiento empiezan a pelear por el espacio con la propia página. Establecer MinWidth := 320 and MinHeight := 240 avoids that visual breakdown while still letting users dock the viewer narrowly.
When a constraint kicks in, the active FitMode recalcula el zoom de la página frente al tamaño de cliente limitado. Esto garantiza que fit-to-width y fit-to-page no produzcan nunca tamaños de píxel cero o negativos que de otro modo harían que PDFium omitiera el renderizado
Constraints additionally interacts with widget-set themed minimum sizes, but the PDFium control's own logic uses only the values declared here.MaxWidth := 800 while keeping MinWidth := 0.OnResize and a re-fit if the current size violates the new range.
// Keep the viewer usable in any layout configuration
procedure TForm1.FormCreate(Sender: TObject);
begin
PdfView1.Constraints.MinWidth := 320;
PdfView1.Constraints.MinHeight := 240;
PdfView1.Constraints.MaxWidth := 0; // no max
PdfView1.Constraints.MaxHeight := 0; // no max
PdfView1.Anchors := [akLeft, akTop, akRight, akBottom];
PdfView1.FitMode := pfmFitToWidth;
end;