PdfContentEditor
Overview
PdfContentEditor is a class in Aspose.PDF FOSS for C++.
PdfContentEditor.ReplaceText(srcText, destText) searches the entire document and replaces matching strings, returning true when at least one replacement occurs.
This class provides 22 methods for working with PdfContentEditor objects in C++ programs.
Available methods include: AddDocumentAdditionalAction, AddDocumentAttachment, ChangeViewerPreference, DeleteAttachments, DeleteImage, DeleteStamp, DeleteStampById, DeleteStampByIds, GetViewerPreference, HideStampById, MoveStamp, MoveStampById, and 5 additional methods.
All public members are accessible to any C++ application after installing the Aspose.PDF FOSS for C++ package.
Accessor methods: DocumentClose, DocumentOpen, DocumentPrinted, DocumentSaved, DocumentWillPrint, DocumentWillSave.
Accessor Methods
| Name | Type | Access | Description |
|---|---|---|---|
DocumentOpen | std::string | Read/Write | Gets or sets the document open. |
DocumentClose | std::string | Read/Write | Gets or sets the document close. |
DocumentWillSave | std::string | Read/Write | Gets or sets the document will save. |
DocumentSaved | std::string | Read/Write | Gets or sets the document saved. |
DocumentWillPrint | std::string | Read/Write | Gets or sets the document will print. |
DocumentPrinted | std::string | Read/Write | Gets or sets the document printed. |
Methods
| Signature | Description |
|---|---|
PdfContentEditor() | Calls PdfContentEditor on this PdfContentEditor instance. |
AddDocumentAttachment(path: std::string, description: std::string) | Calls AddDocumentAttachment(path, description) on this PdfContentEditor instance. |
DeleteAttachments() | Calls DeleteAttachments on this PdfContentEditor instance. |
AddDocumentAdditionalAction(actionName: std::string, javaScript: std::string) | Calls AddDocumentAdditionalAction(actionName, javaScript) on this PdfContentEditor instance. |
RemoveDocumentOpenAction() | Calls RemoveDocumentOpenAction on this PdfContentEditor instance. |
ChangeViewerPreference(pageLayout: int) | Calls ChangeViewerPreference(pageLayout) on this PdfContentEditor instance. |
GetViewerPreference() → int | Returns the viewer preference. |
ReplaceImage(pageNum: int, imageNum: int, fileName: std::string) | Calls ReplaceImage(pageNum, imageNum, fileName) on this PdfContentEditor instance. |
DeleteImage(pageNum: int, imageNum: std::vector<int>) | Calls DeleteImage(pageNum, imageNum) on this PdfContentEditor instance. |
DeleteImage() | |
ReplaceText(srcText: std::string, destText: std::string) → bool | Searches the entire document and replaces matching strings, returning true when at least one replacement occurs |
ReplaceText(srcText: std::string, pageNum: int, destText: std::string) → bool | Calls ReplaceText(srcText, pageNum, destText) on this PdfContentEditor instance. |
ReplaceText(srcText: std::string, destText: std::string, pageNum: int) → bool | Calls ReplaceText(srcText, destText, pageNum) on this PdfContentEditor instance. |
DeleteStamp(pageNum: int, stampId: std::vector<int>) | Calls DeleteStamp(pageNum, stampId) on this PdfContentEditor instance. |
DeleteStampByIds(stampIds: std::vector<int>) | Calls DeleteStampByIds(stampIds) on this PdfContentEditor instance. |
DeleteStampByIds(pageNum: int, stampIds: std::vector<int>) | Calls DeleteStampByIds(pageNum, stampIds) on this PdfContentEditor instance. |
DeleteStampById(pageNum: int, stampId: int) | Calls DeleteStampById(pageNum, stampId) on this PdfContentEditor instance. |
DeleteStampById(stampId: int) | Calls DeleteStampById(stampId) on this PdfContentEditor instance. |
HideStampById(pageNum: int, stampId: int) | Calls HideStampById(pageNum, stampId) on this PdfContentEditor instance. |
ShowStampById(pageNum: int, stampId: int) | Calls ShowStampById(pageNum, stampId) on this PdfContentEditor instance. |
MoveStampById(pageNum: int, stampId: int, offsetX: double, offsetY: double) | Calls MoveStampById(pageNum, stampId, offsetX, offsetY) on this PdfContentEditor instance. |
MoveStamp(pageNum: int, stampId: int, offsetX: double, offsetY: double) | Calls MoveStamp(pageNum, stampId, offsetX, offsetY) on this PdfContentEditor instance. |