procedure AddImage(const FileName: string; X, Y, Width, Height: Integer); overload;
procedure AddImage(Bitmap: TBitmap; X, Y, Width, Height: Integer); overload;
AddImage 會在 TPdfView 目前顯示的頁面中插入一張點陣影像。與接收 PDF 使用者空間座標的 TPdf.AddImage 不同,這個多載接受檢視器所使用的 client 座標矩形
檔案多載會透過 TPicture.LoadFromFile 載入影像,接著走與 AddPicture 相同的轉換路徑。任何已向作用中 VCL 或 LCL 圖形堆疊註冊的影像格式都可以使用
點陣圖多載會插入既有的 TBitmap,不需從磁碟載入。傳入 nil 會引發 EPdfError。兩個多載都會對檢視器的左上與右下兩點呼叫 DeviceToPage,再以得出的頁面矩形寫入一個 PDF 影像物件
PdfView1.Active 必須是 True,且目標頁面必須可見TPicture 時,請使用 TPdfView.AddPicture
if PdfView1.Active then
begin
PdfView1.AddImage('C:\Images\logo.png', 24, 180, 120, 48);
PdfView1.UpdatePage;
end;