The 'Replace Text with Image' flow action locates instances of the specified text in the Word or PDF document provided and replaces with the image provided.
Please refer to the following article showcasing the 'Search and Replace Text' Power Automate action: Populate a Word or PDF Document using Power Automate
The default 'Replace Text with Image' flow action parameters are detailed below:
- File Type: The type of file to process (DOCX or PDF)
- Filename: The PDF filename (including the file extension)
- File Content: A Base64 encoded representation of the PDF file to be converted.
- Search Text: The text to locate and replace with the specified image
- Image Filename: The filename for the image file (including the file extension)
- Image File Content: A Base64 encoded representation of the image.
- Skip First Page: Set whether to ignore the first page when searching for the text fragment.
Please refer to the Obtaining the 'File Contents' Parameter article for guidance on how to obtain the 'File Content' parameter ready to provide to an Encodian flow action.
The advanced 'Replace Text with Image' flow action parameters are detailed below:
- Apply To: Set which pages within the PDF document to search for the text fragment
- Page Numbers: Specify the page numbers to search for the text fragment, this property only applies when the 'Apply To' property is set to 'Specific'.
- Ignore Page Numbers: Specify the page numbers not to search for the text fragment, this property only applies when the 'Apply To' property is set to 'Specific'.
- Operation ID: (Advanced) The ID of a parent operation, please refer to Flow Action Return Options: File Content vs. Operation ID
- Return File: (Advanced) Sets whether the action should return a file or alternatively an operation ID: Flow Action Return Options: File Content vs. Operation ID
The 'Replace Text with Image' flow action returns the following data.
Standard Return Values
- Filename - The filename of the updated PDF document.
- FileContent - The processed document content (Base 64).
- OperationId - The unique ID assigned to this operation.
- HttpStatusCode - The HTTP Status code for the response.
- HttpStatusMessage - The HTTP Status message for the response.
- Errors - An array of error messages should an error occur.
- Operation Status - Indicates whether the operation has been completed, has been queued or has failed.
how to do exact text searches