property WindowHandle: HWND;
Returns the handle inherited from the platform control: VCL supplies a Windows HWND, whilst native LCL supplies its widget set's handle, which must never be passed to Windows APIs
Zero means that the platform widget has not been allocated; parent the viewer and allow its framework to create the widget before using this handle
Use the handle on the UI thread with its matching framework and widget set only; it is separate from PDFium document/page handles and expires when the widget is destroyed
begin
if PdfView1.WindowHandle <> 0 then
PdfView1.Invalidate;
end;