InvalidOperationException when executing the ExportToPdf() API from IronPython script through Automation Services.