property ObjectType[Index: Integer]: TObjectType; // read only
| Index | Zero-based page-object index, in the range 0 to ObjectCount - 1. |
ObjectType는 Index의 page object 종류를 설명하는 TObjectType enumeration 값을 반환합니다
otText — text-showing operator (Tj, TJ, ', ") — font와 text matrix를 공유하는 glyph run입니다otPath — vector path입니다: line, curve, rectangle, fill입니다. page 위 rectangle을 얻으려면 ObjectBounds를 사용하세요otImage — raster image입니다. 픽셀을 가져오려면 ObjectBitmap과 함께 사용하세요otShading — gradient 또는 function 기반 shading pattern입니다 (PDF axial/radial/coon shading)otForm — form XObject입니다: text, path, image를 포함할 수 있는 재사용 가능한 sub-stream입니다이 분류는 안정적이고 비용이 적습니다. ObjectCount 전체를 순회하는 tight loop 안에서 호출하는 것이 page content를 분류한 뒤 더 무거운 accessor(ObjectBitmap, ObjectBounds, character property)를 고를 때의 표준 방식입니다
Form XObject는 이 property로 재귀적으로 펼쳐지지 않습니다. type은 otForm을 보고하고, leaf-level content가 필요하면 호출자가 form의 자체 object list로 내려가야 합니다
// Histogram of object types on the current page
var
I: Integer;
Counts: array[TObjectType] of Integer;
T: TObjectType;
begin
FillChar(Counts, SizeOf(Counts), 0);
for I := 0 to Pdf.ObjectCount - 1 do
Inc(Counts[Pdf.ObjectType[I]]);
for T := Low(TObjectType) to High(TObjectType) do
Memo1.Lines.Add(Format('%s: %d', [GetEnumName(TypeInfo(TObjectType), Ord(T)), Counts[T]]));
end;