XML:Writingformat return in error with OCR SDK ENGINE WITH PYTHON


I am using python in order to convert pdf to an XML file. I got the XML without font attributes such as font size, type ..etc. I tried to add this option (XML:Writingformat) but it returns 450 error invalid parameter, so how can I add this option to my code without returning any error.  


from ABBYY import CloudOCR
ocr_engine = CloudOCR(application_id='', password='')
input_file = open('no5.pdf', 'rb')
post_file = { input_file}
result = ocr_engine.process_and_download(post_file, exportFormat='xml,pdfTextAndImages', language='English')

for format, content in result.items():
output_filename = '{name}.{extension}'.format(name='.'.join('.')[:-1]), extension=format)
with open(output_filename, 'wb') as output_file:




1 comment

  • Avatar
    Oksana Serdyuk

    According to the description of the processImage method, the name of this parameter is xml:writeFormatting and not XML:Writingformat. Please try to use the exact name of the parameter.

    For debugging your code we can recommend to use Fiddler. It allows to see what requests are sent to the server and what are the responses. It can be downloaded for free from

    If you still cannot resolve the issue, please send us to such logs for investigating the issue in details. 

    Comment actions Permalink

Please sign in to leave a comment.