PdfContentEditor
Tổng quan
PdfContentEditor là một class trong Aspose.PDF FOSS cho C++.
PdfContentEditor.ReplaceText(srcText, destText) tìm kiếm toàn bộ tài liệu và thay thế các chuỗi khớp, trả về true khi có ít nhất một lần thay thế.
Lớp này cung cấp 22 phương thức để làm việc với các đối tượng PdfContentEditor trong chương trình C++. Các phương thức khả dụng bao gồm: AddDocumentAdditionalAction, AddDocumentAttachment, ChangeViewerPreference, DeleteAttachments, DeleteImage, DeleteStamp, DeleteStampById, DeleteStampByIds, GetViewerPreference, HideStampById, MoveStamp, MoveStampById, và 5 phương thức bổ sung. Tất cả các thành viên công khai đều có thể truy cập cho bất kỳ ứng dụng C++ nào sau khi cài đặt gói Aspose.PDF FOSS cho C++. Các phương thức truy cập: DocumentClose, DocumentOpen, DocumentPrinted, DocumentSaved, DocumentWillPrint, DocumentWillSave.
Phương thức truy cập
| Tên | Kiểu | Truy cập | Mô tả |
|---|---|---|---|
DocumentOpen | std::string | Đọc/Ghi | Lấy hoặc đặt tài liệu mở. |
DocumentClose | std::string | Đọc/Ghi | Lấy hoặc đặt đóng tài liệu. |
DocumentWillSave | std::string | Đọc/Ghi | Lấy hoặc đặt tài liệu sẽ được lưu. |
DocumentSaved | std::string | Đọc/Ghi | Lấy hoặc đặt tài liệu đã lưu. |
DocumentWillPrint | std::string | Đọc/Ghi | Lấy hoặc đặt tài liệu sẽ được in. |
DocumentPrinted | std::string | Đọc/Ghi | Lấy hoặc đặt tài liệu đã in. |
Phương thức
| Chữ ký | Mô tả |
|---|---|
PdfContentEditor() | Gọi PdfContentEditor trên đối tượng PdfContentEditor này. |
AddDocumentAttachment(path: std::string, description: std::string) | Gọi AddDocumentAttachment(path, description) trên đối tượng PdfContentEditor này. |
DeleteAttachments() | Gọi DeleteAttachments trên đối tượng PdfContentEditor này. |
AddDocumentAdditionalAction(actionName: std::string, javaScript: std::string) | Gọi AddDocumentAdditionalAction(actionName, javaScript) trên đối tượng PdfContentEditor này. |
RemoveDocumentOpenAction() | Gọi RemoveDocumentOpenAction trên đối tượng PdfContentEditor này. |
ChangeViewerPreference(pageLayout: int) | Gọi ChangeViewerPreference(pageLayout) trên đối tượng PdfContentEditor này. |
GetViewerPreference() → int | Trả về tùy chọn của trình xem. |
ReplaceImage(pageNum: int, imageNum: int, fileName: std::string) | Gọi ReplaceImage(pageNum, imageNum, fileName) trên đối tượng PdfContentEditor này. |
DeleteImage(pageNum: int, imageNum: std::vector<int>) | Gọi DeleteImage(pageNum, imageNum) trên đối tượng PdfContentEditor này. |
DeleteImage() | |
ReplaceText(srcText: std::string, destText: std::string) → bool | Tìm kiếm toàn bộ tài liệu và thay thế các chuỗi khớp, trả về true khi có ít nhất một lần thay thế xảy ra. |
ReplaceText(srcText: std::string, pageNum: int, destText: std::string) → bool | Gọi ReplaceText(srcText, pageNum, destText) trên đối tượng PdfContentEditor này. |
ReplaceText(srcText: std::string, destText: std::string, pageNum: int) → bool | Gọi ReplaceText(srcText, destText, pageNum) trên đối tượng PdfContentEditor này. |
DeleteStamp(pageNum: int, stampId: std::vector<int>) | Gọi DeleteStamp(pageNum, stampId) trên đối tượng PdfContentEditor này. |
DeleteStampByIds(stampIds: std::vector<int>) | Gọi DeleteStampByIds(stampIds) trên đối tượng PdfContentEditor này. |
DeleteStampByIds(pageNum: int, stampIds: std::vector<int>) | Gọi DeleteStampByIds(pageNum, stampIds) trên đối tượng PdfContentEditor này. |
DeleteStampById(pageNum: int, stampId: int) | Gọi DeleteStampById(pageNum, stampId) trên đối tượng PdfContentEditor này. |
DeleteStampById(stampId: int) | Gọi DeleteStampById(stampId) trên đối tượng PdfContentEditor này. |
HideStampById(pageNum: int, stampId: int) | Gọi HideStampById(pageNum, stampId) trên đối tượng PdfContentEditor này. |
ShowStampById(pageNum: int, stampId: int) | Gọi ShowStampById(pageNum, stampId) trên đối tượng PdfContentEditor này. |
MoveStampById(pageNum: int, stampId: int, offsetX: double, offsetY: double) | Gọi MoveStampById(pageNum, stampId, offsetX, offsetY) trên đối tượng PdfContentEditor này. |
MoveStamp(pageNum: int, stampId: int, offsetX: double, offsetY: double) | Gọi MoveStamp(pageNum, stampId, offsetX, offsetY) trên đối tượng PdfContentEditor này. |