AnnotationCollection
Overview
AnnotationCollection là một lớp trong Aspose.PDF FOSS cho .NET. Dòng thừa kế từ: IReadOnlyList<Annotation>.
Thu thập các bản ghi trên một trang.
Khóa học này cung cấp 35 phương pháp để làm việc với các đối tượng AnnotationCollection trong các chương trình .NET. Các phương pháp có sẵn bao gồm: Accept, Add, AddCaretAnnotation, AddCircleAnnotation, AddFileAttachmentAnnotation, AddFreeTextAnnotation, AddHighlightAnnotation, AddInkAnnotation, AddLineAnnotation, AddLinkAnnotation, AddPolyLineAnnotation, AddPolygonAnnotation,17 phương pháp bổ sung. Tất cả các thành viên công cộng đều có thể truy cập bất kỳ ứng dụng .NET nào sau khi cài đặt Aspose.PDF FOSS cho gói .Net. Tài sản : Count, IsReadOnly, IsSynchronized, SyncRoot.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
Count | int | Read | Nhận được số. |
IsReadOnly | bool | Read | Luôn luôn giả: người gọi có thể thêm và xóa các ghi chú. |
IsSynchronized | bool | Read | Luôn luôn giả: người gọi hàng loạt truy cập của riêng họ. |
SyncRoot | object | Read | Đối tượng Sentinel cho ICollection.SyncRoot-style khóa. |
Methods
| Signature | Description |
|---|---|
AddTextAnnotation(rect: Rectangle, contents: string, title: string?, open: bool) | Thêm một ghi chú văn bản (sticky note). |
AddFreeTextAnnotation(rect: Rectangle, contents: string, fontName: string?, fontSize: double, color: double[]?) | Thêm một ghi chú văn bản miễn phí (tên được hiển thị trực tiếp trên trang). |
AddLinkAnnotation(rect: Rectangle, uri: string) | Thêm một ghi chú liên kết với hành động URI. |
AddLinkAnnotation(rect: Rectangle, destinationPage: int, destRect: Rectangle) | Thêm một ghi chú liên kết với mục đích trang (đối với các bài đăng TOC). |
AddLinkAnnotation(rect: Rectangle, action: PdfAction) | Thêm một liên kết ghi chú với hành động tùy chỉnh. |
AddHighlightAnnotation(rect: Rectangle, quadPoints: double[]?, color: double[]?) | Thêm một ghi chú nổi bật. |
AddUnderlineAnnotation(rect: Rectangle, quadPoints: double[]?, color: double[]?) | Thêm một ghi chú dưới đây. |
AddStrikeOutAnnotation(rect: Rectangle, quadPoints: double[]?, color: double[]?) | Thêm một ghi chú Strikeout. |
AddSquareAnnotation(rect: Rectangle, borderColor: double[]?, fillColor: double[]?, lineWidth: double) | Thêm một ghi chú đường (tương tự). |
AddCircleAnnotation(rect: Rectangle, borderColor: double[]?, fillColor: double[]?, lineWidth: double) | Thêm một vòng (ellipse) ghi chú. |
AddLineAnnotation(rect: Rectangle, x1: double, y1: double, x2: double, y2: double, color: double[]?, lineWidth: double) | Thêm một dòng ghi chú. |
AddInkAnnotation(rect: Rectangle, inkPaths: double[][], color: double[]?, lineWidth: double) | Thêm một dấu hiệu (thiết kế bằng tay). |
AddStampAnnotation(rect: Rectangle, contents: string, stampName: string) | Thêm một nhãn hiệu gạch. |
AddCaretAnnotation(rect: Rectangle, contents: string?) | Thêm một ghi chú caret (được thêm vào điểm). |
AddRedactAnnotation(rect: Rectangle, color: double[]?, overlayText: string?) | Thêm một bản ghi lại biên tập. |
AddFileAttachmentAnnotation(rect: Rectangle, contents: string, fileName: string, fileData: byte[]) | Thêm một file attachment ghi chú. |
AddSquigglyAnnotation(rect: Rectangle, quadPoints: double[]?, color: double[]?) | Thêm một ghi chú nhầm lẫn. |
AddPolygonAnnotation(rect: Rectangle, vertices: double[], borderColor: double[]?, fillColor: double[]?, lineWidth: double) | Thêm một ghi chú polygon. |
AddPolyLineAnnotation(rect: Rectangle, vertices: double[], color: double[]?, lineWidth: double) | Thêm một ghi chú polyline. |
AddPopupAnnotation(rect: Rectangle, open: bool) | Thêm một popup ghi chú. |
AddWatermarkAnnotation(rect: Rectangle, contents: string?) | Thêm một dấu hiệu nước. |
Add(wa: WatermarkAnnotation) | Thêm một WatermarkAnnotation đối tượng. |
Add(annotation: Annotation) | Thêm bất kỳ ghi chú nào được tạo bằng lập trình. |
Add(annotation: Annotation, considerRotation: bool) | Thêm một ghi chú, tùy chọn áp dụng xoay của trang vào /Rect entry của ghi âm trước khi nhập. |
Clear() | Xóa tất cả các ghi chú từ bộ sưu tập. |
Contains(annotation: Annotation) | Đúng khi ghi chú hiện đang trong bộ sưu tập (được phù hợp với tham chiếu, sau đó bằng cách hỗ trợ đếm). |
CopyTo(array: Annotation[], index: int) | Sao chép các ghi chú vào hàng bắt đầu với index. |
Delete() | Xóa tất cả các ghi chú từ bộ sưu tập (alias for Clear). |
Delete(index: int) | Xóa ghi chú trên chỉ số 1 được cung cấp. |
FindByName(name: string) | Tìm một ghi chú mà /NM (tên ghi âm) nhập hợp với tên. |
Remove(annotation: Annotation) | Xóa trận đấu đầu tiên của ghi chú; trở lại đúng khi một ghi âm đã được xóa. |
Delete(annotation: Annotation) | Xóa ghi chú đã được đưa ra từ bộ sưu tập. |
RemoveAt(index: int) | Xóa một ghi chú trên chỉ số đó. |
GetEnumerator() | Tải ghi chú trên một hình ảnh chụp của danh sách dưới đây để người gọi có thể xóa các ghi chép (via Delete / RemoveAt) từ bên trong một cái lỗ mà không cần đi qua hộp bảo vệ thu thập trực tiếp. |
Accept(visitor: AnnotationSelector) | Đi bộ mỗi ghi chú trong bộ sưu tập và gửi nó cho du khách. |