// Create a production with page level numbering public async Task <int> CreatePageLevelProductionAsync(int workspaceArtifactId) { Console2.WriteDisplayStartLine($"Creating Production [Name: {Constants.Production.NAME}]"); try { // Construct the production object that you want to create Production production = new Production { Name = Constants.Production.NAME, Details = new ProductionDetails { DateProduced = Constants.Production.DateProduced, EmailRecipients = Constants.Production.EMAIL_RECIPIENTS, ScaleBrandingFont = Constants.Production.SCALE_BRANDING_FONT, BrandingFontSize = Constants.Production.BRANDING_FONT_SIZE, PlaceholderImageFormat = Constants.Production.PLACEHOLDER_IMAGE_FORMAT }, Numbering = new PageLevelNumbering { BatesPrefix = Constants.Production.BATES_PREFIX, BatesSuffix = Constants.Production.BATES_SUFFIX, BatesStartNumber = Constants.Production.BATES_START_NUMBER, NumberOfDigitsForDocumentNumbering = Constants.Production.NUMBER_OF_DIGITS_FOR_DOCUMENT_NUMBERING }, Footers = new ProductionFooters { LeftFooter = new HeaderFooter(Constants.Production.HEADER_FOOTER_FRIENDLY_NAME) { Type = Constants.Production.HEADER_FOOTER_TYPE, FreeText = Constants.Production.HEADER_FOOTER_FREE_TEXT } }, Keywords = Constants.Production.KEYWORDS, Notes = Constants.Production.NAME }; // Save the production into the specified workspace int productionArtifactId = await ProductionManager.CreateSingleAsync(workspaceArtifactId, production); Console2.WriteDebugLine($"Production ArtifactId: {productionArtifactId}"); Console2.WriteDisplayEndLine("Created Production!"); return(productionArtifactId); } catch (ValidationException validationException) { throw new Exception("There are validation errors when creating Production", validationException); } catch (Exception ex) { throw new Exception("An error occured when creating Production", ex); } }