PDFium Component Docs

PageColor property

Component: TPdfView  ·  Unit: PDFium
رنگ پس‌زمینه‌ای که زیر صفحه PDF رندرشده نقاشی می‌شود و از Color کنترل پیرامونی جداست. مقدار پیش‌فرض clWhite است تا صفحه‌های PDF حتی وقتی رنگ کنترل میزبان تیره است همچنان کاغذسفید بمانند

Syntax

property PageColor: TColor;

Description

Prior to v1.18.0 the rendered PDF page used the TPdfView's Color property as its background. That was awkward for dark-mode applications: setting Color := clBlack to blend the viewer into a dark UI also painted PDF pages on a black backdrop, which made any document with transparent regions look wrong.

PageColor decouples the two surfaces:

The default clWhite means PDF pages render as paper-white regardless of the host application's theme — matching the look every other PDF reader gives. Applications that previously set TPdfView.Color to recolor the PDF page should set PageColor instead; the new default is a strict improvement for the common case.

Remarks

Example

// Dark-mode viewer pattern: dark scroll area, paper-white PDF page
PdfView1.Color := clBlack;
PdfView1.PageColor := clWhite;

// Sepia-tinted reader background
PdfView1.PageColor := $00C8E3F4; // BGR — soft amber

// Restore pre-v1.18.0 behavior where Color sets the page background
PdfView1.PageColor := PdfView1.Color;

See Also

Color, PageShadowColor, PageShadowSize, PageBorderColor