Hi Simon,
Currently, there is no way to increase the size limit. Here is the supported documentation:
https://free.blessedness.top/en-us/azure/ai-services/translator/service-limits#asynchronous-batch-operation-limits
I tried dividing the PPT using Python code on my end, but it doesn't create valid PPTs.
You cannot specify the line breaks to be ignored.
Here is the supported documentation:
https://free.blessedness.top/en-us/azure/ai-services/translator/text-translation/quickstart/rest-api?tabs=python#headers
You can use the below code to remove every line break from your PPT:
from pptx import Presentation
def remove_line_breaks(text):
return text.replace('\n', ' ').replace('\r', ' ')
def remove_line_breaks_from_pptx(file_path, output_file_path):
prs = Presentation(file_path)
for slide in prs.slides:
for shape in slide.shapes:
if hasattr(shape, "text"):
shape.text = remove_line_breaks(shape.text)
prs.save(output_file_path)
print(f"PowerPoint file saved without line breaks as '{output_file_path}'.")
input_pptx = r'<YOUR-PPTX-FILE-PATH-HERE>'
output_pptx = 'output_pptx_file_without_line_breaks.pptx'
remove_line_breaks_from_pptx(input_pptx, output_pptx)
Feel free to accept this as an answer.
Thankyou for reaching out to the Microsoft QNA Portal.