Hello, I wanted to try a basic text replace but I didn’t manage to make it works. The PDF is generated by Adobe Illustrator. I tried with various standard and compatibility when saving the file without success.
The response: {‘code’: 200, ‘matches’: 0, ‘status’: ‘OK’}
The code used (Python):
import os
import asposepdfcloud
from asposepdfcloud.apis.pdf_api import PdfApi
pdf_api_client = asposepdfcloud.api_client.ApiClient(
app_key=“xxxxxxxxxxxxxxxxx”,
app_sid=‘xxxxxxx-xxxx-xxxxx-xxxxx-xxxxxxx’)
pdf_api = PdfApi(pdf_api_client)
filename = ‘pagina2.pdf’
remote_name = ‘pagina2.pdf’
pdf_api.upload_file(remote_name,filename)
text_replace1 = asposepdfcloud.models.TextReplace(old_value=‘PDF’,new_value=‘David Aviles’,regex=‘true’)
text_replace_list = asposepdfcloud.models.TextReplaceListRequest(text_replaces=[text_replace1])
response = pdf_api.post_document_text_replace(remote_name, text_replace_list)
print(response)pagina2.pdf (46.1 KB)