private string SaveReport(InDesign.Document reportTemplate)
        {
            const int pdfTypeCode = 1952403524; // it's number code from InDesign Server Scripting Guide (VBScript)

            var resultReportPath = ReportConfigurationManager.GetAbsolutePathToResultReportFile(resultReportFileName);

            reportTemplate.Export(pdfTypeCode, resultReportPath);
            return(resultReportPath);
        }
        public string CreateReportFromTemplate()
        {
            var templatePath = ReportConfigurationManager.GetAbsolutePathToReportTemplateFile();

            provider.InitializeProvider();
            var reportTemplate = provider.GetReportTemplate(templatePath);

            FillReportContent(reportTemplate);
            var savedReportPath = SaveReport(reportTemplate);

            provider.DestroyProvider();
            return(savedReportPath);
        }