property ObjectBitmap[Index: Integer]: TBitmap; // read only
ObjectType[Index] = otImage olduğunda Index konumundaki sayfa nesnesini yeni ayrılmış bir VCL/LCL TBitmap olarak, resim olmayan sayfa nesneleri için ise nil döndüren indeksli salt okunur property
Active değerinin True olmasını gerektirir. Geçerli indeksler 0 .. ObjectCount - 1'dir (0 .. BitmapCount - 1 aralığında yalnızca resim indekslemesi için bunun yerine Bitmap[Index] kullanın)
Döndürülen TBitmap instance'ının sahibi çağırandır ve işi bitince Free çağırmalıdır
| Index | 0 .. ObjectCount - 1 aralığında sıfır tabanlı sayfa nesnesi indeksi |
ObjectType[Index] = otImage kontrolü yapın (ya da Assigned(Bmp) kontrol edin) ve onu bir try .. finally bloğunda serbest bırakınRemoveObject ya da InsertObjectAtIndex gibi) sayfa nesnesi indekslerini değiştirir; düzenlemelerden sonra ObjectCount'u yeniden sorgulayın
var
I: Integer;
Bmp: TBitmap;
begin
if not Pdf1.Active then Exit;
for I := 0 to Pdf1.ObjectCount - 1 do
if Pdf1.ObjectType[I] = otImage then
begin
Bmp := Pdf1.ObjectBitmap[I];
try
if Assigned(Bmp) then
Memo1.Lines.Add(Format('Object %d: %dx%d', [I, Bmp.Width, Bmp.Height]));
finally
Bmp.Free;
end;
end;
end;