Replace Text with Formatting
Introduction
Using Aspose.Slides Cloud, you can replace all occurrences of text and apply formatting for it. Aspose.Slides Cloud provides you with the following methods for replacing text with formatting.
ReplaceTextFormatting
This method replaces text in a presentation on storage.
API Information
API | Type | Description | Resource |
---|---|---|---|
/slides/{name}/replaceTextFormatting | POST | Replaces text in a presentation with formatting. | ReplaceTextFormatting |
Request Parameters
Name | Type | Location | Required | Description |
---|---|---|---|---|
name | string | path | true | The name of a presentation file. |
oldValue | string | query | true | The text string to be replaced. |
newValue | string | query | true | The text string to replace with. |
portionFormat | PortionFormat | body | false | The format of the text. Defaults to the format of the first character of the first occurrence. |
withMasters | boolean | query | false | Indicates whether the replacement includes master slides. False by default. |
password | string | header | false | The password to open the presentation. |
folder | string | query | false | The path to the folder containing the presentation. |
storage | string | query | false | The name of the storage contaning the folder . |
In case of Amazon S3 storage folder path starts with Amazon S3 bucket name.
Examples
Replace every word banana with the word orange in the document MyFolder/MyPresentation.pptx & format it to orange color.
cURL Solution
SDK Solutions
ReplaceTextFormattingOnline
This method replaces text in a presentation provided in request body, and returns the updated presentation in response.
API Information
API | Type | Description | Resource |
---|---|---|---|
/slides/replaceTextFormattingOnline | POST | Replaces text in a presentation with formatting. | ReplaceTextFormattingOnline |
Request Parameters
Name | Type | Location | Required | Description |
---|---|---|---|---|
document | binary | body | true | The presentation file. |
oldValue | string | query | true | The text string to be replaced. |
newValue | string | query | true | The text string to replace with. |
portionFormat | PortionFormat | body | false | The format of the text. Defaults to the format of the first character of the first occurrence. |
withMasters | boolean | query | false | Indicates whether the replacement includes master slides. False by default. |
password | string | header | false | The password to open the presentation. |
Examples
Replace every word banana with the word orange on the second slide in the uploaded document.
cURL Solution
SDK Solutions
SDKs
Check Available SDKs to learn how to add an SDK to your project.