Annotation

Annotation

Gambaran Umum

Annotation adalah kelas dalam Aspose.PDF FOSS untuk Python.

Tampilan langsung atas satu anotasi pada halaman.

Kelas ini menyediakan 5 metode untuk bekerja dengan objek Annotation dalam program Python. Metode yang tersedia meliputi: __init__, generate_appearance, get_property, set_property, update_properties. Semua anggota publik dapat diakses oleh aplikasi Python mana pun setelah menginstal paket Aspose.PDF FOSS untuk Python. Properti: appearance_normal, author, color, contents, has_appearance, properties, dan 3 lagi.

Properti

NamaJenisAksesDeskripsi
subtypestrBacaMendapatkan subtipe.
contentsstrBaca/TulisMendapatkan atau mengatur isi.
recttuple[float, float, float, float]Baca/TulisMendapatkan atau mengatur rect.
titlestrBaca/TulisMendapatkan atau mengatur judul.
authorstrBaca/TulisMendapatkan atau mengatur penulis.
has_appearanceboolBacaMendapatkan apakah memiliki tampilan.
appearance_normalbytesBaca/TulisMendapatkan atau mengatur appearance normal.
propertiesdict[str, Any]BacaEntri anotasi spesifik tipe di luar bidang umum.
colortuple[float, ...]Baca/TulisWarna anotasi (/C) sebagai tuple komponen, kosong bila tidak disetel.

Metode

Tanda TanganDeskripsi
__init__(page: Page, index: int, data: dict[str, Any])Calls init(page, index, data) pada instance Annotation ini.
get_property(name: str, default: Any) → AnyKembalikan nilai properti tipe-spesifik tunggal (atau default).
set_property(name: str, value: Any)Setel properti tipe-spesifik tunggal (value=None menghapusnya).
update_properties()Setel beberapa properti khusus tipe sekaligus.
generate_appearance(force: bool) → boolSintesis stream tampilan normal (/AP /N) untuk anotasi ini.

Lihat Juga

 Bahasa Indonesia